A Ship Slip Rate Prediction System
Through the design of a ship's slip loss prediction system, the random forest model and meteorological data interface uses the problem that existing technology cannot automatically predict the sliding rate, and achieves higher prediction accuracy and efficiency.
Patent Information
- Application Number
- CN202111014629.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-31
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2041-08-31
AI Technical Summary
The prior art cannot automatically predict the ship slip rate based on meteorological forecast data, and the existing methods fail to effectively consider the impact of flow, resulting in large prediction errors.
A ship slip loss forecasting system is designed. By obtaining the original route plan, supplementing the insertion point, calculating the ship's direction, and calling the meteorological data interface to obtain meteorological forecast data. The system uses random forest models to extract meteorological data characteristics to predict the speed deviation of speed and calculate the sliding rate.
The automatic prediction of the ship's slip loss based on meteorological forecast data is achieved, the accuracy and efficiency of the prediction is improved, the manual operation is reduced, and the prediction error is reduced.
Smart Images

Figure CN113919549B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of ship technology, and in particular to a ship slip rate prediction system. Background Art
[0002] The current world economic situation is sluggish, and the international shipping market is inevitably affected. How to reduce shipping costs and increase profits has become a topic of general concern in the international market, and reducing main engine fuel consumption is a key link.
[0003] Many shipping companies face operational pressure and choose to optimize their speed to save fuel consumption in order to reduce expenses. Speed optimization means sailing at different speeds in different sea areas according to the sea conditions in different areas. Therefore, we must first analyze the impact of sea conditions on ship speed, that is, the relationship between sea conditions and slip rate.
[0004] Currently, only the influence of weather on ship resistance or ship stall value is studied, and there is no method or system for predicting slip rate according to sea conditions. Among them, the existing technology uses mathematical models of still water resistance, wind resistance and wave resistance to calculate ship resistance, and then uses main engine power, propeller efficiency and ship resistance to calculate the stall value of the ship under the same main engine power. However, the actual marine conditions are very complicated. This scheme does not consider the influence of flow, and requires difficult-to-measure values such as seawater density, wet surface area, and seawater kinematic viscosity, resulting in large prediction errors. In addition, although the mainstream viscous flow CFD commercial software has the ability to simulate ship resistance, its engineering application is very complicated, time-consuming, requires cumbersome model tests, and has high costs. Summary of the invention
[0005] In view of the above analysis, an embodiment of the present invention aims to provide a ship slip rate prediction system to solve the existing problem that the slip rate of the route plan cannot be automatically predicted based on weather forecast data.
[0006] The embodiment of the present invention provides a ship slip rate prediction system, comprising the following steps:
[0007] The original route plan is obtained, and the insertion point is added to obtain the supplemented segment data; the ship's heading is calculated according to the timestamp, longitude and latitude in the supplemented segment data;
[0008] Based on the supplemented flight segment data, the meteorological data interface is called to obtain the meteorological forecast data, and the abnormal values of the meteorological forecast data and the corresponding flight segment data are eliminated to obtain the processed meteorological forecast data and the final flight segment data;
[0009] Based on the processed weather forecast data and ship bow direction, the meteorological data features are extracted and passed into the trained random forest model to predict the speed deviation of the final segment data. Then, based on the planned speed in the final segment data, the slip rate of the final segment data is calculated.
[0010] Based on the further improvement of the above system, the historical voyage data is obtained, and the ship heading is calculated based on the historical voyage data, including the following steps:
[0011] Obtaining the to-be-processed segment data from the segment data table according to at least one time range passed in, the to-be-processed segment data including: turning point number, timestamp, longitude, latitude, rotation speed, and speed;
[0012] Determine whether any value of the timestamp, longitude, and latitude of each turning point in the to-be-processed flight segment data is missing or abnormal. If so, delete the historical flight segment data corresponding to the turning point;
[0013] The remaining flight segment data to be processed is used as historical flight segment data;
[0014] In the historical voyage data, for the historical voyage data lacking the ship's heading, the historical voyage data at adjacent times are respectively taken out as two points to be calculated, and the ship's heading is calculated according to the longitude and latitude of the two points to be calculated.
[0015] Based on the further improvement of the above system, the ship heading is calculated according to the longitude and latitude of the two points to be calculated, including:
[0016] Divide the latitude difference between the two points to be calculated into multiple small segments according to the preset division accuracy;
[0017] Calculate the distance of each small segment on the Mercator chart in turn;
[0018] Sum up the distances of each segment on the Mercator chart and record it as p;
[0019] Divide the longitude difference between the two points to be calculated by the preset division precision, denoted as q;
[0020] Based on the inverse tangent function, according to p and q, the absolute angle α between the two points to be calculated is calculated as arctan(p / q);
[0021] Convert α to the angle with the true north direction, and obtain the bow direction θ=90-α.
[0022] Based on the further improvement of the above system, the historical meteorological data is obtained by using the meteorological data interface, which is to obtain the historical meteorological data according to the timestamp, longitude and latitude in the historical flight data; the historical meteorological data includes: wind speed, flow speed and wave height.
[0023] Based on the further improvement of the above system, the process of obtaining the historical data set after preprocessing the historical voyage data, ship heading and historical meteorological data includes:
[0024] Eliminate unstable historical flight segment data based on the rotation speed in the historical flight segment data;
[0025] Eliminate abnormal values in historical meteorological data, including null values and values greater than 360;
[0026] Eliminate the historical flight segment data corresponding to the outliers;
[0027] The remaining historical voyage data, ship heading, and historical meteorological data are associated with the same timestamp, longitude, and latitude as a historical data set.
[0028] Based on further improvements to the above system, unstable historical flight segment data includes:
[0029] The speed is less than or equal to 0;
[0030] From the current moment to the last 15 minutes, the difference between the maximum speed and the minimum speed exceeds 2 revolutions;
[0031] The current speed differs from the speed 20 minutes ago by more than 2 revolutions, and the average speed from the previous 20 minutes to the previous 10 minutes differs from the average speed from the previous 10 minutes to the current time by more than 2 revolutions;
[0032] If the rotation speed at any moment in the historical flight segment data meets any of the above conditions, the flight segment data at that moment will be eliminated.
[0033] Based on further improvements to the above system, the original route plan includes: turning point number, longitude, latitude, speed, distance to the next turning point, distance to the destination, and planned time to arrive at the current turning point;
[0034] The steps of adding the insertion point to the original route plan and obtaining the supplemented flight segment data include:
[0035] Identify in sequence whether the distance between each two adjacent turning points is greater than the shortest distance. If so, add one or more insertion points in sequence according to the shortest distance, set the insertion point number, and calculate the longitude and latitude of one or more insertion points according to the longitude and latitude of each two adjacent turning points.
[0036] Based on the spherical trigonometric cosine theorem, according to the longitude and latitude of the turning point and the insertion point, the distance between each two adjacent points between the turning point and the insertion point is calculated as the distance to the next turning point; and according to the distance from the turning point to the destination, the distance from each insertion point to the destination is calculated;
[0037] Based on the planned arrival time at the current turning point, the planned speed and the distance between each two adjacent points in the original route plan, the arrival time at each insertion point is calculated in turn.
[0038] Based on the further improvement of the above system, the shortest distance is obtained by multiplying the planned speed of the initial turning point between two adjacent turning points by 1 hour. The longitude and latitude of one or more insertion points are calculated. The insertion points are added between two adjacent turning points with the shortest distance as the interval until the distance between any two adjacent points is less than the shortest distance. No more insertion points are added. The calculation formula of the longitude lot and latitude lat of each insertion point is:
[0039]
[0040]
[0041] Among them, lw 1 is the latitude of the initial turning point among the two adjacent turning points, lj 1 is the longitude of the initial turning point, lw 2 is the latitude of the target turning point among the two adjacent turning points, lj 2 is the longitude of the target turning point, d is the distance between the insertion point and the initial turning point, where the distance between the first insertion point and the initial turning point is the shortest distance, the distance between the second insertion point and the initial turning point is twice the shortest distance, and so on; distonext is the distance between two adjacent turning points.
[0042] Based on the further improvement of the above system, the features of meteorological data extracted include:
[0043] Obtain historical meteorological data from a historical data set or meteorological forecast data from a forecast data set;
[0044] Decompose the wind speed and current speed in the historical meteorological data or the meteorological forecast data vertically and horizontally along the corresponding bow direction to obtain the wind speed and current speed perpendicular to the bow direction, and the wind speed and current speed parallel to the bow direction, wherein the calculated wind speed and current speed perpendicular to the bow direction take the absolute value;
[0045] Then the wave height in the historical meteorological data or the meteorological forecast data is obtained, together with the wind speed and current speed perpendicular to the bow direction of the ship, and the wind speed and current speed parallel to the bow direction of the ship as the meteorological data features.
[0046] Further improvements based on the above system include:
[0047] The flight segment data management module is used to regularly obtain the flight segment data during the voyage using the data collection interface, store it in the flight segment data table, and clean, query and count the data in the flight segment data table;
[0048] The slip rate analysis module is used to select the actual flight segment data corresponding to the predicted data set from the flight segment data table, calculate the actual slip rate, compare it with the predicted slip rate, and display the comparison results through visual charts.
[0049] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:
[0050] 1. By establishing a meteorological data interface, historical meteorological data and meteorological forecast data can be obtained in a timely manner; the wind and flow in the meteorological data are decomposed along the bow direction, the surge in the meteorological data is discarded, the redundant features are eliminated, the correlation between meteorological features and speed deviation is increased, the effectiveness of data features is improved, and the accuracy of model prediction is improved;
[0051] 2. Unified management of segment data, dynamic calculation of ship heading through the longitude and latitude of two adjacent turning points in the segment data, and use the ship heading instead of the heading when there is no heading in the route plan, which increases the applicability of the prediction method. Through timestamp, longitude and latitude, the association between segment data, ship heading and meteorological data is automatically established, which is convenient for data analysis and data feature extraction;
[0052] 3. The integrated algorithm - random forest is used to model the ship slip rate. It is simple and easy to use, saves computing resources, and can identify and display training results through system automatic training, which is convenient for adjusting model parameters and improving model training speed. The slip rate is predicted by training meteorological data and speed deviation, which has important guiding significance for ship route planning and speed adjustment strategy formulation, thereby promoting energy efficiency management and improving energy conservation and emission reduction effects.
[0053] 4. Obtain the original route plan, identify the turning points with too long adjacent distances, interpolate, calculate the coordinates of the insertion points using the principle of similar triangles, calculate the distance between two points on the sphere based on the cosine theorem of spherical trigonometry, improve the interpolated flight segment data, and improve the prediction accuracy;
[0054] 5. The system enables interaction between functional modules, reduces manual operations, automatically acquires and analyzes data, and is flexible and easy to use.
[0055] In the present invention, the above-mentioned technical solutions can also be combined with each other to achieve more preferred combination solutions. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can become obvious from the description, or can be understood by practicing the present invention. The purpose and other advantages of the present invention can be achieved and obtained through the contents particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like components throughout the drawings.
[0057] Figure 1 This is a functional module diagram of a ship slip rate prediction system in Embodiment 1 of the present invention;
[0058] Figure 2 This is a flow chart of a method for obtaining a historical data set in Embodiment 1 of the present invention;
[0059] Figure 3 This is an example diagram of a tree with a depth of 3 during random forest model training in Example 1 of the present invention;
[0060] Figure 4 Schematic diagram of calculating the great circle length between any two points on the earth in Example 1 of the present invention;
[0061] Figure 5 It is a fitting diagram of the slip rate prediction value and the actual value in Example 2 of the present invention;
[0062] Figure 6 This is a graph showing the slip rate prediction results of the route plan in Example 2 of the present invention. DETAILED DESCRIPTION
[0063] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.
[0064] Embodiment 1,
[0065] A specific embodiment of the present invention discloses a ship slip rate prediction system, such as Figure 1 As shown, it includes the following modules:
[0066] The historical data processing module is used to obtain historical voyage data, calculate the ship heading based on the historical voyage data, obtain historical meteorological data using the meteorological data interface, and obtain a historical data set after pre-processing the historical voyage data, the ship heading and the historical meteorological data;
[0067] The model training module is used to extract meteorological data features and actual speed deviations according to the historical data set to obtain a historical sample set, and train a random forest model based on the historical sample set to obtain a trained random forest model;
[0068] The prediction data processing module is used to add insertion points to the original route plan to obtain supplemented segment data; the ship heading is calculated based on the supplemented segment data, and the weather forecast data is obtained by using the weather data interface. The supplemented segment data, the ship heading and the weather forecast data are pre-processed to obtain the prediction data set;
[0069] The slip rate prediction module is used to extract meteorological data features according to the prediction data set, call the trained random forest model, obtain the speed deviation prediction value, and calculate the ship slip rate corresponding to the prediction data set according to the planned speed in the prediction data set.
[0070] During implementation, data acquisition and analysis in the system modules are supported through data tables, including the flight segment data table, which is used to store all flight segment data; the historical data table, which is used to store pre-processed historical data and is selected during model training; the forecast data table, which is used to store the forecast data that is supplemented and pre-processed according to the original route plan and is selected during slip rate prediction; the forecast result table, which is used to store the forecast results for data analysis; and the meteorological data table, which is used to store meteorological data provided by Japan's wni and Europe's stormGeo.
[0071] The execution of the background processing method is called through the interface operation of the functional module to obtain data between modules for interaction. Among them, when the model training module executes model training, the historical data set of the historical data processing module is selected. In the slip rate prediction module, the predicted data set of the predicted data processing module and the trained model in the model training model are selected to obtain the predicted value of the speed deviation and then convert it into the slip rate. When preprocessing the historical data set and the predicted data set, the meteorological data is obtained uniformly using the meteorological data interface.
[0072] Compared with the prior art, this embodiment predicts the slip rate by training meteorological data and speed deviation, and analyzes the influence of sea conditions and slip rate, which has important guiding significance for ship route planning and the formulation of speed regulation strategy; the system realizes data acquisition, processing, training, prediction and analysis, reduces manual operation, and improves the accuracy and efficiency of prediction results.
[0073] Each functional module is described in detail below.
[0074] In the historical data processing module, from historical flight segment data to preprocessed historical data sets, such as Figure 2 As shown, the following steps are included:
[0075] S11: Filter out historical flight segment data from the flight segment data table.
[0076] Specifically, the to-be-processed segment data is obtained from the segment data table according to at least one time range inputted, wherein the to-be-processed segment data includes: turning point number, timestamp, longitude, latitude, rotation speed, and speed;
[0077] Determine whether any value of the timestamp, longitude and latitude of each turning point in the to-be-processed flight segment data is missing or abnormal. If so, delete the historical flight segment data corresponding to the turning point.
[0078] The remaining segment data to be processed is regarded as historical segment data.
[0079] S12: Calculate the ship heading according to the timestamp, longitude and latitude in the historical voyage data.
[0080] It should be noted that the actual ship heading is sometimes collected in the regularly collected ship navigation data. If it is selected as the historical voyage data, there is no need to calculate the ship heading, which improves the efficiency of preprocessing.
[0081] In the historical voyage data, for the historical voyage data lacking the ship heading, the historical voyage data at adjacent times are respectively taken out as two points to be calculated, and the ship heading is calculated according to the longitude and latitude of the two points to be calculated.
[0082] Due to the uneven distribution of latitudes on the Mercator chart, the latitude distance cannot be directly calculated using the latitude difference. Therefore, the latitude distance is obtained by dividing the latitude difference into as many small segments as possible and then summing them up to improve the accuracy of the calculation.
[0083] Set lat 1 and lat 2 are the latitudes of the two points to be calculated, lot 1 and lot 2 are the longitudes of the two points to be calculated, k is the division accuracy, n is the number of divisions, n = (lat 2 -lat 1 ) / k; For example, k is preset to 0.0001. The steps for calculating the ship's heading are as follows:
[0084] Divide the latitude difference between the two points to be calculated into multiple small segments according to the preset division accuracy;
[0085] Calculate the distance of each small segment on the Mercator chart in turn;
[0086] The distance of each small segment on the Mercator chart is summed up and recorded as p. The formula is as follows:
[0087] Divide the longitude difference between the two points to be calculated by the preset division precision, denoted as q, and the formula is as follows:
[0088] q=(lot 2 -lot 1 ) / k (Formula 2)
[0089] Based on the inverse tangent function, the absolute angle α between the two points to be calculated is calculated according to p and q. The formula is as follows:
[0090] α=arctan(p / q) (Formula 3)
[0091] Convert α to the angle with the true north direction, and get the ship's heading of the first point between the two points to be calculated, θ = 90-α. This calculation method dynamically calculates the ship's heading based on the timestamp and longitude and latitude when there is no heading in the route plan, and uses the ship's heading instead of the heading, which increases the applicability of the prediction method.
[0092] S13: Eliminate unstable historical flight segment data according to the rotation speed in the historical flight segment data;
[0093] Specifically, unstable historical flight segment data include:
[0094] The speed is less than or equal to 0;
[0095] From the current moment to the last 15 minutes, the difference between the maximum speed and the minimum speed exceeds 2 revolutions;
[0096] The speed at the current moment differs from the speed 20 minutes ago by more than 2 revolutions, and the average speed from the previous 20 minutes to the previous 10 minutes differs from the average speed from the previous 10 minutes to the current moment by more than 2 revolutions.
[0097] If the rotation speed at any moment in the historical flight segment data meets any of the above conditions, the flight segment data at that moment will be eliminated.
[0098] S14: Call the meteorological data interface to obtain historical meteorological data, and remove abnormal values and their corresponding historical flight segment data.
[0099] It should be noted that the meteorological data comes from global meteorological data. When calling the meteorological data interface, the timestamp in the flight segment data is converted according to the timestamp format required by the meteorological data interface. Exemplarily, when calling the meteorological data interface, the timestamp in the flight segment data is uniformly converted to the unix format.
[0100] According to the timestamp, longitude and latitude in the historical flight segment data, the historical meteorological data obtained by calling the meteorological data interface is converted from m / s to kn to unify the unit with the speed; the null values and abnormal values greater than 360 in the historical meteorological data are eliminated; the historical flight segment data corresponding to the abnormal values are eliminated.
[0101] S15: The remaining historical voyage data, the ship heading, and the processed historical meteorological data are associated with the same timestamp, longitude, and latitude as a historical data set for subsequent data feature extraction.
[0102] In the model training module, a historical data set in the historical data processing module is selected, and the historical meteorological data features are extracted based on the meteorological data and the ship's bow direction in the historical data set; the actual speed deviation is obtained based on the rotation speed and speed in the historical data set; the historical meteorological data features and the speed deviation are used as historical sample sets, including training sets and test sets.
[0103] Specifically, the characteristics of historical meteorological data include wave height, and the wind speed and flow velocity perpendicular to the bow of the ship, and the wind speed and flow velocity parallel to the bow of the ship after decomposing the wind speed and flow velocity in the meteorological data along the bow of the ship. Among them, considering that the wind and flow perpendicular to the ship have the same effect on the ship's slip rate regardless of the left or right side, the calculated values of the wind speed and flow velocity perpendicular to the bow of the ship are taken as absolute values.
[0104] In this embodiment, the surge in the meteorological data is discarded, the redundant features are eliminated, the correlation between the meteorological features and the speed deviation is increased, the validity of the data features is improved, and it is helpful to improve the accuracy of the model prediction.
[0105] Based on the product of the rotation speed and the pitch coefficient in the historical data set and the difference between the speed in the historical data set, the historical data speed deviation is obtained;
[0106] The calculation formula of speed deviation Δv is as follows:
[0107] Δv=r×lv (Formula 4)
[0108] Among them, v is the ship speed, r is the rotation speed, l is the pitch coefficient, and the pitch coefficient l = 6×ship propeller pitch value / 185.2.
[0109] The historical meteorological data features and the historical data speed deviation are used as historical sample sets, including a training set and a test set. For example, 70% of the historical data sample sets are randomly selected as the training set, and 30% of the historical data sample sets are randomly selected as the test set.
[0110] A random forest model was constructed in the model training module. The random forest model was trained based on the training set, the speed deviation was predicted according to the test set, the slip rate was calculated, and the slip rate obtained based on the actual speed deviation in the test set was compared. When the average slip rate error was less than 2%, the training was completed.
[0111] In order to ensure the stability of the prediction results, the random forest model is used. The random forest model is an integrated algorithm with good stability, not prone to overfitting, not easily affected by individual abnormal samples, and often shows amazing performance in classification and regression problems.
[0112] Preferably, during training, the number of trees is set to 500 and the maximum depth is limited to 10. This setting can be used to ensure the learning ability of the tree on the one hand, and on the other hand reduce the complexity of the model, save computing resources, and speed up the calculation speed.
[0113] To illustrate the construction and branching of the tree, the depth of the tree is set to 3. Figure 3 shown.
[0114] Figure 3 It is an inverted tree with the root node at the top. In the figure, x[0] represents the flow parallel to the bow of the ship, and a negative number represents an upstream flow; x[2] represents the wind parallel to the bow of the ship, and a negative number represents an upstream wind; x[4] represents the wave height; in the root node, samples represents the number of training samples, and value represents the average speed deviation of the training samples corresponding to the node. The bottom layer is the leaf nodes. The first value in each leaf node is the number of training samples for the node, and the second value is the average speed deviation of the training samples for the node.
[0115] The root node is divided according to x[4], i.e. the wave height. If it is less than 4.05 meters, it will be assigned to the left node, otherwise it will be assigned to the right node. After being assigned to the corresponding node, it will continue to be divided according to the corresponding node, and so on, until it reaches the leaf node.
[0116] Assume that the input weather data features a wave height of 4 meters, a flow parallel to the bow of -2 kn, and a wind parallel to the bow of -2 kn. Figure 3 , the samples will be divided into the left nodes of the second layer according to the wave height of the root node 4.05m; the left nodes of the second layer are divided according to the flow velocity parallel to the bow direction according to -1.274kn. Since the flow velocity of the input data is -2kn less than -1.274kn, it will be divided into the leftmost node of the third layer. The left nodes of the third layer are divided according to the wind speed parallel to the bow direction according to -1.779kn. Since the input wind along the bow direction is -2kn less than -1.779kn, it will be divided into the left node, such as Figure 3 As shown on the far left of the leaf node, the speed deviation is 0.723 kn, which is the output result of this tree.
[0117] According to the set number of trees, the speed deviation output by each tree is summarized and the average is taken to obtain the speed deviation output by the random forest model; the speed in the training set is added to the corresponding speed deviation to obtain the theoretical speed; the slip rate is the ratio of the speed deviation to the theoretical speed.
[0118] According to the historical meteorological data characteristics in the test set, the speed deviation is predicted, the slip rate is calculated, and the fitting graph of the predicted value and the true value of the test set is displayed. The slip rate obtained based on the actual speed deviation in the test set is compared. When the average slip rate error is less than 2%, the training is completed.
[0119] Preferably, the trained random forest model can be exported as a file to facilitate loading and use in other systems, thereby improving reusability.
[0120] The prediction data processing module is mainly used to obtain the prediction data set based on the original route plan; the original route plan can be imported into the module in the form of a file according to the actual storage format, and then processed after parsing, or obtained from the route planning system using the data access interface.
[0121] It should be noted that since the distances between many turning points in the original route plan are too long, which hinders the prediction of the slip rate on the segments between adjacent turning points, this module interpolates the route plan and adds insertion points to improve the prediction accuracy.
[0122] Specifically, the route plan is the estimated route information made when the ship sets sail. A complete original route plan usually includes: turning point number, longitude, latitude, speed, distance to the next turning point, total distance to the destination, and planned time to arrive at the current turning point. The steps to add insertion points to the original route plan include:
[0123] Identify in sequence whether the distance between each two adjacent turning points is greater than the shortest distance. If so, add one or more insertion points in sequence according to the shortest distance, set the insertion point number, and calculate the longitude and latitude of one or more insertion points according to the longitude and latitude of each two adjacent turning points.
[0124] According to the longitude and latitude of the turning point and the insertion point, the distance between each two adjacent points between the turning point and the insertion point is calculated; and according to the distance from the turning point to the destination, the distance from each insertion point to the destination is calculated;
[0125] Based on the planned arrival time at the current turning point, the planned speed and the distance between each two adjacent points in the original route plan, the arrival time at each insertion point is calculated in turn.
[0126] Break the above steps into the following small steps:
[0127] Step 1: Take the first turning point in the original route plan as the current turning point;
[0128] Step 2: If the current turning point is not the last turning point, calculate the product of the planned speed of the current turning point and 1 hour to get the shortest distance, and go to step 3; otherwise, complete the insertion point and exit the traversal;
[0129] Step 3: If the distance between the current turning point and the next turning point is less than the shortest distance, no insertion point is added, the next turning point is taken as the current turning point, and the process returns to step 2; otherwise, the process goes to step 4.
[0130] Step 4: If the distance between the current turning point and the next turning point is greater than the shortest distance, and the current turning point and the next turning point do not cross the 180-degree meridian, proceed to step 5; otherwise, proceed to step 8;
[0131] Step 5: Add one or more insertion points between the current turning point and the next turning point, calculate the longitude and latitude of the one or more insertion points, and set the turning point numbers of the insertion points;
[0132] Preferably, the insertion point number may be uniformly set to -1 to distinguish it from the original turning point.
[0133] Step 6: For the current turning point, one or more insertion points and the next turning point, calculate the distance between each two adjacent points, as well as the distance from the insertion point to the destination;
[0134] Step 7: Based on the planned arrival time at the current turning point, the planned speed, and the distance between each adjacent point in the original route plan, calculate the arrival time at each insertion point in turn; take the next turning point as the current turning point, and return to step 2;
[0135] Step 8: If the distance between the current turning point and the next turning point is greater than the shortest distance, and the current turning point and the next turning point cross the 180-degree meridian, proceed to step 9, otherwise return to step 2;
[0136] Step 9: Add 360 to the negative longitude between the current turning point and the next turning point;
[0137] Step 10: According to steps 5-7, calculate the longitude and latitude of one or more insertion points, the distance between each two adjacent points, the distance from the insertion point to the destination, and the time to reach each insertion point;
[0138] Step 11: Subtract 360 from the current turning point and the next turning point whose longitude is greater than 180; take the next turning point as the current turning point and return to step 2.
[0139] It should be noted that according to the Mercator projection, points on the earth's surface can be mapped to a two-dimensional plane. On this two-dimensional plane, the Mercator chart, all meridians are perpendicular to the equator and are equally spaced, and all latitudes are parallel to the equator, perpendicular to the meridians, but not evenly distributed. However, when the latitudes of the two inserted turning points are not much different, it can be considered that the latitudes between the two turning points are evenly distributed. At this time, the principle of similar triangles in Euclidean geometry is used to calculate the longitude and latitude of the inserted point.
[0140] In step 5 above, insert points between the current turning point and the next turning point at intervals of the shortest distance until the distance between any two adjacent points is less than the shortest distance, and no more insert points are added. The calculation formula for the longitude lot and latitude lat of each insertion point is as follows:
[0141]
[0142]
[0143] Among them, lw 1 is the latitude of the current turning point, lj 1 is the longitude of the current turning point, lw 2 is the latitude of the next turning point, lj 2 is the longitude of the next turning point, d is the distance between the insertion point and the current turning point, where the distance between the first insertion point and the current turning point is the shortest distance, the distance between the second insertion point and the current turning point is twice the shortest distance, and so on; distonext is the distance between the current turning point and the next turning point.
[0144] It should be noted that the longitude and latitude in Formula 5 and Formula 6 are angle values.
[0145] In the above step 6, the earth is approximated as a sphere, and the distance formula between two points on the earth is calculated using the spherical trigonometric cosine theorem to calculate the distance between each two adjacent points in the route plan.
[0146] like Figure 4 As shown, suppose there are two points P and Q on the earth, and the longitude and latitude of P are (lat 1 ,lot 1 ), the longitude and latitude of Q are (lat 2 ,lot 2 ), N(S) is the North Pole or the South Pole, and the lines between the three points are all great circle arcs. The three great circle arcs form a spherical triangle. The formula for calculating the length of the great circle arc of PQ can be obtained from the cosine formula of the side as follows:
[0147] cosPQ=cosPN×cosQN+sinPN×sinQN×cos∠PQN (Formula 7)
[0148] The side length PN is The side length QN is ∠PNQ is |lot 1 -lot 2 Substituting into formula 7, we get the following formula:
[0149] cosPQ=sin(lat 1 )sin(lat 2)+cos(lat 1 )cos(lat 2 )cos(lot 1 -lot 2 )
[0150] (Formula 8)
[0151] According to formula 8, the calculation formula for the distance dist between two points on the sphere is as follows:
[0152] dist = arccos(sin(lat 1 )sin(lat 2 )·+cos(lat 1 )cos(lat 2 )cos(lot 1 - lot 2 ))×3440.27 (Formula 9)
[0153] Therefore, according to Formula 9, the longitude and latitude of each adjacent point between the turning point and the insertion point are input to obtain the distance between each adjacent point.
[0154] It should be noted that the longitude and latitude in Formula 8 and Formula 9 are radian values. In the route plan, the longitude and latitude are angle values by default. When calculating the spherical distance, the angle value needs to be converted into radian values.
[0155] According to the distance from the turning point to the destination in the route plan, and the distance between the turning point and the adjacent insertion point, the distance from the adjacent insertion point to the destination can be obtained, and so on, the distance from each insertion point to the destination can be obtained.
[0156] Exemplarily, the distance from the first insertion point adjacent to the current turning point to the destination = the distance from the current turning point to the destination - the distance between the current turning point and the first insertion point.
[0157] According to the data items required by the route plan, insert the inserted values to obtain the supplemented segment data; then according to the method for calculating the ship's heading in step S12, the ship's heading is calculated according to the timestamp, longitude and latitude in the supplemented segment data.
[0158] In the prediction data processing module, according to the timestamp, longitude and latitude in the supplemented flight segment data, the meteorological data interface is also called to obtain the weather forecast data. Considering that a flight segment may take one or two months, if the incoming timestamp exceeds the current 9 days, the current time is added to the preset time interval to obtain a new timestamp, and the meteorological data is obtained according to the new timestamp. Preferably, the preset time interval is set to 9, that is, the weather forecast data of the 9th day is uniformly selected for the weather forecast data exceeding the current 9 days.
[0159] The wind speed and flow velocity in the obtained weather forecast data are converted from m / s to kn, the null values and abnormal values greater than 360 in the weather forecast data are eliminated, the corresponding segment data are eliminated from the supplemented segment data, and the remaining segment data, ship heading and processed weather forecast data are associated with the same timestamp, longitude and latitude as the prediction data set.
[0160] In the slip rate prediction module, the meteorological data features are extracted from the meteorological forecast data in the prediction data set according to the method of extracting historical meteorological data features: wind speed and flow velocity perpendicular to the bow direction, wind speed and flow velocity parallel to the bow direction, and wave height.
[0161] Select the random forest model trained in the model training module, or import the trained model file, and after inputting the meteorological data features, obtain the speed deviation prediction value, and then calculate the ship slip rate corresponding to the prediction data set based on the planned speed in the prediction data set. The specific steps include:
[0162] Get the speed deviation prediction value mean, which is the average value of the speed deviation output by each tree in the random forest model;
[0163] According to the planned speed speed and the speed deviation prediction value mean in the prediction data set, the theoretical speed speed_ideal=speed+mean is calculated;
[0164] Calculate the ship slip rate slip = mean / speed_ideal corresponding to the predicted data set.
[0165] Preferably, when the ship is sailing, in order to avoid inaccurate weather forecast data due to too long an interval, new weather forecast data can be obtained regularly, and new weather data features can be extracted to obtain new prediction data.
[0166] Preferably, this embodiment also includes:
[0167] The flight segment data management module is used to regularly obtain the flight segment data during the voyage using the data collection interface, store it in the flight segment data table, and clean, query and count the data in the flight segment data table;
[0168] Exemplarily, when a ship is sailing, the data collection interface is called every 5 minutes to obtain real-time data, which is stored in the segment data table. The segment data management module provides an interface-based query function, which displays the total time, total number of turning points, total distance, and specific details of the eligible segments by time range and geographical range.
[0169] The slip rate analysis module is used to select the actual flight segment data corresponding to the predicted data set from the flight segment data table, calculate the actual slip rate, compare it with the predicted slip rate, and display the comparison results through visual charts.
[0170] For example, the comparison results are displayed through line graphs and map route diagrams, which facilitates the analysis of prediction errors, adjustment of model training parameters, and obtaining a more accurate model.
[0171] Compared with the prior art, the ship slip rate prediction system provided in this embodiment manages the voyage data in a unified manner, establishes a meteorological data interface, realizes the interaction between functional modules through the system, reduces manual operations, automatically obtains and analyzes data, and is flexible and easy to use; in the case of no heading in the route plan, the ship's bow direction is dynamically calculated according to the timestamp and longitude and latitude, and the heading is replaced by the ship's bow direction, which increases the applicability of the prediction method; the wind and flow in the meteorological data are decomposed along the ship's bow direction, the surge in the meteorological data is discarded, the redundant features are eliminated, the correlation between the meteorological features and the speed deviation is increased, and the validity of the data features is improved. It helps to improve the accuracy of model predictions; it obtains the original route plan, identifies turning points with too long adjacent distances, interpolates them, and uses the principle of similar triangles to calculate the coordinates of the insertion points. Based on the cosine theorem of spherical trigonometry, it calculates the distance between two points on the sphere to improve prediction accuracy; based on historical navigation data and meteorological data, it uses an integrated algorithm - random forest to model the ship's slip rate and predict the slip rate on the route plan. It is simple and easy to use, with a high accuracy rate, and has important guiding significance for the formulation of ship route planning and speed adjustment strategies, thereby promoting energy efficiency management and improving the effects of energy conservation and emission reduction.
[0172] Embodiment 2,
[0173] In this embodiment, in the system of embodiment 1, actual operation data of a VLCC (Very Large Crude Carrier) is selected from the voyage data table for testing and verification.
[0174] The voyage data from September 9, 2020 to October 7, 2020 and November 21, 2020 to December 8, 2020 were selected, and the timestamp, longitude, latitude, rotation speed, and speed were extracted. The ship's heading and speed deviation were calculated and preprocessed. The meteorological data corresponding to the voyage segment was obtained from the meteorological data interface, and the abnormal data was eliminated. A total of 10,527 valid data points were obtained to form a historical sample set.
[0175] Based on the historical sample set, 70% of the data was randomly selected as the training set and 30% of the data was randomly selected as the test set for training the random forest model.
[0176] After training, the speed deviation is converted into the slip rate, and the average absolute error of the slip rate is 1.85%, and the median absolute error is 1.34%. 100 data points are selected to draw a fitting graph of the slip rate prediction value and the true value, as shown in Figure 5 shown.
[0177] Import the ship's route plan from 2020-11-21 to 2020-12-30 for verification. First, interpolate it and add the number of turning points from the original 65 to 975. Call the meteorological data interface to obtain meteorological data, remove outliers and their corresponding segment data, and obtain 947 valid turning points. Calculate the ship's heading data, extract meteorological data features, select the trained random forest model, and predict the ship's slip rate on the route plan. The results are as follows: Figure 6 As shown, the ordinate represents the slip rate and the abscissa represents the turning point. The predicted average slip rate is 6.7%, while the average slip rate of the ship after actually sailing the route plan is 7.9%, and the slip rate error is only 1.2%. In the slip rate analysis module, the comparison results are displayed through a map route map. The route is the planned sailing route of the ship. The depth of the color represents the size of the slip rate. The darker the color, the greater the slip rate, and the lighter the color, the smaller the slip rate.
[0178] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0179] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A ship slip rate prediction system, characterized in that: include: The historical data processing module is used to obtain historical voyage data, calculate the ship heading based on the historical voyage data, obtain historical meteorological data using a meteorological data interface, and obtain a historical data set after pre-processing the historical voyage data, the ship heading and the historical meteorological data; the calculation of the ship heading based on the historical voyage data is to take out the historical voyage data at adjacent moments of the historical voyage data that lacks the ship heading, and use them as two points to be calculated, and calculate the ship heading according to the longitude and latitude of the two points to be calculated, including: dividing the latitude difference between the two points to be calculated into multiple small segments according to a preset division accuracy; calculating each of the segments in turn. The distance of the small segment on the Mercator chart; summing up the distance of each small segment on the Mercator chart, recorded as p; dividing the longitude difference between the two points to be calculated by the preset division accuracy, recorded as q; based on the inverse tangent function, according to p and q, calculating the absolute angle α=arctan(p / q) between the two points to be calculated; converting α to the angle with the true north direction to obtain the bow direction θ=90-α; the use of the meteorological data interface to obtain historical meteorological data is to obtain historical meteorological data according to the timestamp, longitude and latitude in the historical segment data; the historical meteorological data includes: wind speed, flow speed and wave height; The model training module is used to extract meteorological data features and actual speed deviations according to historical data sets to obtain historical sample sets, and train a random forest model based on the historical sample sets to obtain a trained random forest model; the meteorological data features include: wave height, and wind speed and flow speed perpendicular to the bow direction, and wind speed and flow speed parallel to the bow direction obtained by decomposing the wind speed and flow speed in the historical meteorological data along the bow direction; wherein the calculated values of the wind speed and flow speed perpendicular to the bow direction are taken as absolute values; The prediction data processing module is used to add insertion points to the original route plan to obtain supplemented segment data; the ship heading is calculated based on the supplemented segment data, and the weather forecast data is obtained by using the weather data interface. The supplemented segment data, the ship heading and the weather forecast data are pre-processed to obtain the prediction data set; The slip rate prediction module is used to extract meteorological data features according to the prediction data set, call the trained random forest model, obtain the speed deviation prediction value, and calculate the ship slip rate corresponding to the prediction data set according to the planned speed in the prediction data set.
2. The ship slip rate prediction system according to claim 1, characterized in that: The acquisition of historical flight segment data includes the following steps: Acquire the to-be-processed segment data from the segment data table according to at least one time range input, wherein the to-be-processed segment data includes: turning point number, timestamp, longitude, latitude, rotation speed, and speed; Determine whether any value of the timestamp, longitude and latitude of each turning point in the to-be-processed segment data is missing or abnormal. If so, delete the historical segment data corresponding to the turning point; the remaining to-be-processed segment data is used as the historical segment data.
3. The ship slip rate prediction system according to claim 2, characterized in that: The process of obtaining the historical data set after preprocessing the historical voyage data, the ship heading and the historical meteorological data includes: Eliminate unstable historical flight segment data according to the rotation speed in the historical flight segment data; Eliminate abnormal values in historical meteorological data, including null values and values greater than 360; Eliminate the historical flight segment data corresponding to the abnormal value; The remaining historical voyage data, ship heading, and historical meteorological data are associated with the same timestamp, longitude, and latitude as a historical data set.
4. The ship slip rate prediction system according to claim 3, characterized in that: The unstable historical flight segment data include: The speed is less than or equal to 0; From the current moment to the last 15 minutes, the difference between the maximum speed and the minimum speed exceeds 2 revolutions; The current speed differs from the speed 20 minutes ago by more than 2 revolutions, and the average speed from the previous 20 minutes to the previous 10 minutes differs from the average speed from the previous 10 minutes to the current time by more than 2 revolutions; If the rotation speed at any moment in the historical flight segment data meets any of the above conditions, the flight segment data at that moment will be eliminated.
5. The ship slip rate prediction system according to claim 1, characterized in that: The original route plan includes: turning point number, longitude, latitude, speed, distance to the next turning point, distance to the destination, and planned time to arrive at the current turning point; The steps of adding the insertion point to the original route plan and obtaining the supplemented flight segment data include: Identify in sequence whether the distance between each two adjacent turning points is greater than the shortest distance. If so, add one or more insertion points in sequence according to the shortest distance, set the insertion point number, and calculate the longitude and latitude of one or more insertion points according to the longitude and latitude of each two adjacent turning points. Based on the spherical trigonometric cosine theorem, according to the longitude and latitude of the turning point and the insertion point, the distance between each two adjacent points between the turning point and the insertion point is calculated as the distance to the next turning point; and according to the distance from the turning point to the destination, the distance from each insertion point to the destination is calculated; Based on the planned arrival time at the current turning point, the planned speed and the distance between each two adjacent points in the original route plan, the arrival time at each insertion point is calculated in turn.
6. The ship slip rate prediction system according to claim 5, characterized in that: The shortest distance is obtained by multiplying the planned speed of the initial turning point between two adjacent turning points by 1 hour. The longitude and latitude of one or more insertion points are calculated by adding insertion points between two adjacent turning points at intervals of the shortest distance until the distance between any two adjacent points is less than the shortest distance, and no insertion points are added. The calculation formula for the longitude lot and latitude lat of each insertion point is: Among them, lw1 is the latitude of the initial turning point among the two adjacent turning points, lj1 is the longitude of the initial turning point, lw2 is the latitude of the target turning point among the two adjacent turning points, lj2 is the longitude of the target turning point, d is the distance between the insertion point and the initial turning point, among which the distance between the first insertion point and the initial turning point is the shortest distance, the distance between the second insertion point and the initial turning point is twice the shortest distance, and so on; distonext is the distance between two adjacent turning points.
7. The ship slip rate prediction system according to any one of claims 1 to 6, characterized in that: Also includes: The flight segment data management module is used to regularly obtain the flight segment data during the voyage using the data collection interface, store it in the flight segment data table, and clean, query and count the data in the flight segment data table; The slip rate analysis module is used to select the actual flight segment data corresponding to the predicted data set from the flight segment data table, calculate the actual slip rate, compare it with the predicted slip rate, and display the comparison results through visual charts.
Citation Information
Patent Citations
Ship navigational speed optimization auxiliary decision-making system
CN110967022A
Method and device for estimating oil consumption of diesel main engine of large ship
CN111046491A