Disclosure of Invention
In view of the above, an object of the present invention is to provide a method, an apparatus and a system for measuring wind speed and direction, so as to solve the problems in the prior art that the measurement result of the mechanical wind direction and wind speed sensor has a large relationship with the installation position thereof, the response speed is slow, and the ultrasonic wind direction and wind speed sensor is bulky and has a high cost and cannot be popularized.
In order to achieve the above purpose, the technical solutions adopted in the embodiments of the present application are as follows:
in a first aspect, an embodiment of the present application provides a wind speed and direction measurement method, which is applied to a controller in a wind speed and direction measurement system, where the wind speed and direction measurement system includes: the ship comprises a ship body, at least one airflow rope, an inertia measurement unit, an image acquisition unit and a controller, wherein each airflow rope is arranged on a sail or a mast of the ship body respectively; the method comprises the following steps:
acquiring a target image sequence of each airflow rope acquired by the image acquisition unit, wherein the target image sequence comprises a plurality of frames of images;
acquiring attitude data of the hull, which is acquired by the inertial measurement unit, wherein the attitude data comprises the direction of the hull, the roll angle of the hull and the pitch angle of the hull;
and inputting the target image sequence and the attitude data into a wind measurement algorithm model obtained in advance to obtain wind speed and wind direction information in the current environment of the ship body.
As a possible implementation manner, the inputting the target image sequence and the attitude data into a pre-obtained wind measurement algorithm model to obtain wind speed and wind direction information in the current environment of the ship body includes:
inputting the target image sequence and the attitude data into a wind measurement algorithm model to obtain vector data of natural wind relative to the ship body;
and determining the wind speed and direction information according to the vector data.
As a possible implementation manner, the determining the wind speed and direction information according to the vector data includes:
processing the original acquisition data acquired by the inertia measurement unit by using a Runge Kutta method to obtain a quaternion and a direction cosine matrix formed by the quaternion, wherein the direction cosine matrix is used for representing the rotation direction of the ship body relative to a geographic coordinate system;
multiplying the vector data by the inverse matrix of the direction cosine matrix to obtain wind vector data under a geographic coordinate system;
and determining the wind speed and the wind direction according to the wind vector data.
As a possible implementation, the raw acquisition data includes: acceleration data, gyroscope data, and magnetometer data.
As a possible implementation manner, the acquiring a target image sequence of each of the airflow ropes acquired by the image acquisition unit includes:
acquiring an original image sequence of the airflow rope acquired by the image acquisition unit under the blowing of natural wind;
and respectively preprocessing each image in the original image sequence to obtain the target image sequence.
As a possible implementation manner, the acquiring the attitude data of the ship hull collected by the inertial measurement unit includes:
acquiring original acquisition data of the ship body acquired by the inertial measurement unit;
and processing the original collected data to obtain the attitude data of the ship body.
In a second aspect, an embodiment of the present application further provides an anemometry apparatus, including: an anemorumbometer for use in a controller of an anemorumbometer system, said anemorumbometer system comprising: the ship comprises a ship body, at least one airflow rope, an inertia measurement unit, an image acquisition unit and a controller, wherein each airflow rope is arranged on a sail or a mast of the ship body respectively; the device comprises:
the first acquisition module is used for acquiring a target image sequence of each airflow rope acquired by the image acquisition unit, wherein the target image sequence comprises a plurality of frames of images;
the second acquisition module is used for acquiring attitude data of the ship body, which is acquired by the inertial measurement unit, wherein the attitude data comprises the direction of the ship body, the roll angle of the ship body and the pitch angle of the ship body;
and the processing module is used for inputting the target image sequence and the attitude data into a wind measurement algorithm model obtained in advance to obtain wind speed and wind direction information in the current environment of the ship body.
As a possible implementation manner, the first obtaining module is specifically configured to:
acquiring an original image sequence of the airflow rope acquired by an image acquisition unit under the blowing of natural wind; and respectively preprocessing each image in the original image sequence to obtain a target image sequence.
As a possible implementation manner, the second obtaining module is specifically configured to:
acquiring original acquisition data of a ship body acquired by an inertia measurement unit; and processing the original collected data to obtain the attitude data of the ship body.
As a possible implementation manner, the processing module is specifically configured to:
inputting the target image sequence and the attitude data into a wind measurement algorithm model to obtain vector data of natural wind relative to the ship body; and determining wind speed and wind direction information according to the vector data.
As a possible implementation manner, the processing module is further specifically configured to:
processing the original acquisition data acquired by the inertia measurement unit by using a Longge Kutta method to obtain a quaternion and a direction cosine matrix formed by the quaternion, wherein the direction cosine matrix is used for representing the rotation direction of the ship body relative to a geographic coordinate system; multiplying the vector data by the inverse matrix of the direction cosine matrix to obtain wind vector data under a geographic coordinate system; and determining the wind speed and the wind direction according to the wind vector data.
In a third aspect, an embodiment of the present application further provides a wind speed and direction measurement system, including: the ship comprises a ship body, at least one airflow rope, an inertia measurement unit, an image acquisition unit and a controller, wherein each airflow rope is arranged on a sail or a mast of the ship body respectively;
the controller is configured to determine wind speed and direction information in the current environment of the hull using the method according to the first aspect.
In a fourth aspect, an embodiment of the present application further provides an electronic device, including: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, when the electronic device runs, the processor and the storage medium communicate through the bus, and the processor executes the program instructions to execute the steps of the wind speed and direction measuring method according to the first aspect.
In a fifth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the anemometry method according to the first aspect.
The beneficial effect of this application is:
the embodiment of the application provides a wind speed and direction measuring method, device and system, which are applied to a controller in a wind speed and direction measuring system, wherein the wind speed and direction measuring system comprises: the ship comprises a ship body, at least one airflow rope, an inertia measurement unit, an image acquisition unit and a controller, wherein each airflow rope is arranged on a sail or a mast of the ship body respectively; the method comprises the following steps: acquiring a target image sequence of each airflow rope acquired by an image acquisition unit, wherein the target image sequence comprises a plurality of frames of images; acquiring attitude data of the ship body, which is acquired by an inertia measurement unit, wherein the attitude data comprises the direction of the ship body, the roll angle of the ship body and the pitch angle of the ship body; and inputting the target image sequence and the attitude data into a wind measurement algorithm model obtained in advance to obtain wind speed and wind direction information in the current environment of the ship body. In the steps of the method, the airflow rope is arranged on the ship body, the image sequence of the airflow rope is acquired by the image acquisition unit, the attitude data of the ship body is acquired by the inertia measurement unit, and the wind speed and wind direction information under the current environment is calculated and acquired according to the image sequence of the airflow rope and the attitude data of the ship body.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for illustrative and descriptive purposes only and are not used to limit the scope of protection of the present application. Additionally, it should be understood that the schematic drawings are not necessarily drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be performed out of order, and steps without logical context may be performed in reverse order or simultaneously. One skilled in the art, under the guidance of this application, may add one or more other operations to, or remove one or more operations from, the flowchart.
In addition, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that in the embodiments of the present application, the term "comprising" is used to indicate the presence of the features stated hereinafter, but does not exclude the addition of further features.
At present, in the field of navigation, wind direction and speed sensors for measuring wind force and wind direction can be roughly divided into two types, namely a mechanical wind direction and speed sensor and an ultrasonic wind direction and speed sensor.
The mechanical wind direction and wind speed sensor is internally integrated with a mechanical photoelectric conversion circuit, and determines the wind direction and the wind speed by calculating the rotating speed of a wind cup and the angle of a wind vane. However, the measurement result of the mechanical wind direction and speed sensor has a large relationship with the installation position thereof. If the device is arranged at the top end of the mast, the sensor can incline in a larger range due to the inclination of the hull when the sailing boat sails, and the measurement precision of the device can be obviously reduced; the turbulence created by the sail also severely affects the measurement accuracy if installed on the front or rear side of the deck. In addition, the response time of the mechanical sensor is slow, and it is difficult to implement a real-time and fast control strategy.
The ultrasonic wind direction and speed sensor obtains wind speed and direction information by analyzing the modulation effect of air flow on ultrasonic waves. The sensor has the advantages of high reaction speed, high measurement precision, no zero drift and longer service life. The method is mature in large ships, marine equipment and other occasions. However, the ultrasonic wind direction and speed sensor is bulky and high in cost, which greatly limits the feasibility of application in unmanned sailing vessels, especially in small-sized unmanned sailing vessels with low cost.
In view of the above problems of the mechanical wind direction and wind speed sensor and the ultrasonic wind direction and wind speed sensor, the application provides a wind speed and wind direction measuring method, which is based on the technical scheme that an airflow rope is arranged on a ship body, and a machine vision method is used for simulating a sailing boat to observe the airflow rope to obtain wind direction and wind speed information, so that the sailing boat can be accurately controlled.
According to the wind speed and direction measuring method provided by the embodiment of the application, a wind measuring algorithm model which is fully trained in advance is used, so that a measuring error smaller than that of a mechanical wind direction and wind speed sensor and a response speed higher than that of the mechanical wind direction and wind speed sensor can be obtained. Especially when the wind direction changes greatly or turns, the mechanical sensor has serious hysteresis, generally needs more than 10 seconds of stabilization time, and generates an absolute error of 2m/s or more. The wind speed and direction measuring method provided by the application has the advantages that the absolute error value of the measurement of the embodiment of the wind speed and direction measuring method is basically kept below 0.5m/s, and the wind speed and direction measuring method has great measurement accuracy advantages compared with a mechanical wind direction and wind speed sensor.
Compared with the ultrasonic wind sensor, the wind speed and direction measuring method provided by the embodiment of the application has the advantages that the implementation cost is far lower than that of the ultrasonic wind speed and direction sensor, and the load and space requirements of a ship (especially an unmanned sailing ship) can be greatly reduced by a light and simple installation and deployment mode.
The wind speed and direction measuring method provided by the embodiment of the application is applied to a wind speed and direction measuring system. First, the following description will explain the wind speed and direction measurement system.
Please refer to fig. 1, which is a schematic structural diagram of an anemometry system provided in the present application, and as shown in fig. 1, the anemometry system may include: ahull 101, at least oneair flow rope 102, an Inertial Measurement Unit (IMU) 103, animage acquisition Unit 104, and acontroller 105.
Theairflow ropes 102 may be respectively disposed on a sail or a mast of the hull 101 (fig. 1 illustrates the airflow ropes disposed on the mast), theimage capturing unit 104 may be disposed below theairflow ropes 102, that is, near one side of the hull, and may completely capture the positions of the images of the airflow ropes, and the appropriate setting position of theimage capturing unit 104 may be determined in advance through measurement, experiment, and the like, so that theairflow ropes 102 are all located within the visual field of theimage capturing unit 104. Theinertial measurement unit 103 generally needs to be located at the center of gravity of thehull 101 and thecontroller 105 may be located on thehull 101, as exemplified in fig. 1 by thecontroller 105 being located on thehull 101. Moreover, theinertial measurement unit 103 and theimage acquisition unit 104 are respectively in communication connection with acontroller 105, and thecontroller 105 is configured to determine wind speed and direction information in the current environment of thehull 101 by using the wind speed and direction measurement method described in this application.
Optionally, thecontroller 105 may also adopt a remote control mode, please refer to fig. 2, which is a schematic structural diagram of another wind speed and direction measurement system provided in the present application, and as shown in fig. 2, thecontroller 105 may be a remote electronic device, for example, a desktop computer, a notebook computer, a palm computer, an intelligent terminal, and the like.
When thecontroller 105 is connected to theinertial measurement unit 103 and theimage acquisition unit 104 in a local connection manner, the connection manner may be any type of wired or wireless connection, or a combination thereof. When thecontroller 105 is connected to theinertial measurement unit 103 and theimage acquisition unit 104 in a communication manner by remote connection, the connection may be any wireless connection due to the long distance. For example, common wired accesses are: the conventional wireless access methods include fiber access, Pulse Code Modulation (PCM) dedicated Line access, Digital Data Network (DDN) dedicated Line access, Digital dedicated Line access, Asymmetric Digital Subscriber Line (ADSL) dedicated Line access, and the like, and the common wireless access methods include: the internet, Local Area Network (LAN), Wide Area Network (WAN), wireless Local Area Network, etc. Thecontroller 105 is connected to theinertial measurement unit 103 and theimage acquisition unit 104 in a local connection manner or a remote connection manner, and the application is not limited in this respect. In addition, thecontroller 105 may be a separate electronic device or may be a processing component in the electronic device.
It should be noted that, in fig. 1 and 2, the number of theairflow ropes 102 is merely illustrative and is not limited herein. For better recognizability and anti-interference capability, theairflow rope 102 may be red in color, and theairflow rope 102 may be installed at a position where the sail or the mast is exposed to the water and is not shielded but receives the natural wind. Further, wind direction strips, flags or even common ribbons of other colors may be used to achieve wind speed and direction measurements, but are also within the concept of air flow ropes per se and are still within the scope of the present application.
For simplicity of description, in the following method embodiments, the description will be made with reference to the "hull" when referring to thehull 101, with reference to the "airflow rope" when referring to theairflow rope 102, with reference to the "IMU" when referring to theinertia measurement unit 103, with reference to the "image acquisition unit" when referring to theimage acquisition unit 104, and with reference to the "controller" when referring to thecontroller 105.
The following embodiments will explain the wind speed and direction measurement method provided by the embodiments of the present application in detail with reference to the drawings.
Please refer to fig. 3, which is a flowchart illustrating a wind speed and direction measuring method according to an embodiment of the present application, wherein an execution main body of the method may be a controller in the wind speed and direction measuring system. As shown in fig. 3, the wind speed and direction measuring method includes:
step S301, acquiring a target image sequence of each airflow rope acquired by the image acquisition unit.
Specifically, since the image information of the air flow ropes in the fluttering state is time-dependent, the image data of each air flow rope can be acquired a plurality of times at fixed time intervals. For example, the image capturing unit captures images of each airflow rope from time t0, 5 times in total, and once every 1 second, wherein the images are captured at times t0, t1, t2, t3 and t4, respectively, and assuming that the image of the airflow rope at time t0 is image0, the image at time t1 is image1, the image at time t2 is image2, the image at time t3 is image3 and the image at time t4 is image4, the obtained target image sequence is an image sequence composed ofimages 0, 1, image2, image3 and image4, and the target image sequence includes images 0, image1, image2, image3 and image4 of a plurality of frames, and is used as input data for calculating wind speed. It should be noted that the size of the fixed time interval may be determined in advance through a test mode, so as to achieve a better wind speed and wind direction measurement result, and the application is not limited specifically.
Step S302, acquiring the attitude data of the ship body collected by the inertia measurement unit.
Specifically, the attitude data of the hull includes a direction of the hull, a roll angle of the hull, and a pitch angle of the hull, where the pitch angle of the hull is an angle between an X-axis of the hull and a horizontal plane, and may be represented by ρ, and the roll angle of the hull is an angle between a Y-axis of the hull and the horizontal plane, and may be represented by ρ
And (4) showing.
Because the ship body can form a pitch angle and a roll angle under the blowing of wind in the running process of the ship, the pitch angle and the roll angle can influence the projection characteristics of the airflow rope in the image acquisition unit, and the attitude data of the ship body can be obtained through the inertial measurement unit arranged on the ship body
An Inertial Measurement Unit (IMU) is a device that measures angular velocities and accelerations of an object in an X axis, a Y axis, and a Z axis. Typically, an IMU includes three single axis gyroscopes and three single axis accelerometers, and may also include three single axis magnetometers. The gyroscope is used for measuring angular velocity signals of the carrier in all directions relative to a navigation coordinate system, the accelerometer is used for measuring acceleration signals of the carrier in all directions in a three-dimensional space, and the magnetometer can be used for measuring the strength and the direction of a magnetic field so as to position the direction of the equipment, namely the included angle between the orientation of the equipment and north. By measuring the angular velocity data and the acceleration data of the object in the three-dimensional space and the intensity and direction data of the magnetic field, the attitude data of the object can be obtained through a filtering algorithm and a fusion algorithm, and the method has important application value in navigation. Generally, the IMU needs to be mounted on the center of gravity of the object being tested.
Step S303, inputting the target image sequence and the attitude data into a wind measurement algorithm model obtained in advance, and obtaining wind speed and direction information in the current environment of the ship body.
Specifically, the target image sequence obtained in the previous step and the attitude data of the ship body are used
The wind speed and the wind direction information in the current environment of the ship body can be obtained by inputting the wind speed and the wind direction information into a wind measurement algorithm model, wherein the wind measurement algorithm model is a neural network model and can be obtained by pre-training.
It should be noted that in the measurement operation process, other neural network models may also be used, or the conversion calculation process based on the direction cosine matrix is deleted, and other models are directly built to complete the end-to-end measurement calculation, and the measurement of the wind speed and the wind direction may also be realized. Of course, such methods may involve more conventional computation in the network, making the network more difficult to train, and may require deeper networks to achieve suitable test accuracy. In essence, however, this also belongs to the wind measurement method based on machine vision provided in the embodiments of the present application, and shall be included in the protection scope of the present application.
Please refer to fig. 4, which is a diagram illustrating a network structure of a wind measurement algorithm model provided in an embodiment of the present application, and as shown in fig. 4, the wind measurement algorithm model obtained by pre-training is a 16-layer composite network model. Wherein conv represents a convolutional layer, max _ posing represents a maximum value pooling layer, dense represents a fully connected layer, which are all general layers in a neural network, and the dimensions of each middle layer are also shown in fig. 4, so that according to the graph, a model can be built under a TensorFlow platform for data training. The TensorFlow is a second generation artificial intelligence learning system developed by Google based on an open source machine learning system DistBeief, and the naming of the TensorFlow is derived from the operation principle of the TensorFlow. Tensor means an N-dimensional array, Flow means computation based on a dataflow graph, and TensorFlow is a computation process in which tensors Flow from one end of the Flow graph to the other. Furthermore, 10 ten thousand groups of data samples can be collected, randomly disordered and uniformly distributed, 80% of 8 ten thousand groups of data are taken as a training set, therest 2 ten thousand groups of data are taken as a testing set, and the network is built under a TensorFlow framework for training and testing.
In summary, the embodiment of the present application provides a wind speed and direction measuring method, which includes obtaining a target image sequence of each airflow rope acquired by an image acquisition unit, where the target image sequence includes a plurality of frames of images; acquiring attitude data of the ship body, which is acquired by an inertia measurement unit, wherein the attitude data comprises the direction of the ship body, the roll angle of the ship body and the pitch angle of the ship body; and inputting the target image sequence and the attitude data into a wind measurement algorithm model obtained in advance to obtain wind speed and wind direction information in the current environment of the ship body. In the steps, the airflow rope is arranged on the ship body, the image acquisition unit acquires the image sequence of the airflow rope and the inertial measurement unit acquires the attitude data of the ship body, and the wind speed and wind speed information of the current environment is calculated and acquired according to the image sequence of the airflow rope and the attitude data of the ship body, so that the wind direction and wind speed information can be acquired by simulating the mode of observing the airflow rope by a sailing boat hand through machine vision, the problems that the measurement result of a mechanical wind direction sensor has many relations with the installation position of the mechanical wind direction sensor, the measurement precision is inaccurate, the response time is slow, the problem that the cost of an ultrasonic sensor is high is solved, the precise control of the sailing boat is realized, and the realization cost is low. The wind speed and direction measuring method based on machine vision provided by the embodiment of the application has the advantages of being remarkable in precision and real-time performance, low in implementation cost, simple to deploy and very suitable for application occasions such as unmanned sailing ships.
Please refer to fig. 5, which is a schematic flow chart of another wind speed and direction measuring method according to an embodiment of the present application, and as shown in fig. 5, the step S301 includes:
step S501, acquiring an original image sequence of each airflow rope acquired by an image acquisition unit under the blowing of natural wind.
Specifically, the original image sequence may refer to an image sequence composed of original image data of the airflow rope acquired by the image acquisition unit. For example, 20 frames of raw video image data of the airflow rope may be acquired at a time by the image acquisition unit, each frame including three RGB color channels, and assuming an image resolution of 640 × 480, the raw image sequence is 20 × 640 × 480 × 3.
Step S502, each image in the original image sequence is preprocessed respectively to obtain a target image sequence.
Specifically, after an original image sequence acquired by an image acquisition unit is obtained, each image in the original image sequence needs to be preprocessed, so as to obtain a target image sequence. The preprocessing comprises data cleaning and normalization, and specifically, the data cleaning and normalization operations comprise square clipping, graying, scaling and channel adjustment. Continuing with the example in step S501, theoriginal image sequence 20 × 640 × 480 × 3 undergoes a preprocessing operation to generate adata sequence 128 × 20, which is used as the target image sequence.
Please refer to fig. 6, which is a schematic flow chart of another wind speed and direction measuring method according to an embodiment of the present application, and as shown in fig. 6, the step S302 includes:
step S601, acquiring original acquisition data of the ship body acquired by the inertia measurement unit.
In particular, it is necessary to acquire raw acquisition data of the hull acquired by the inertial measurement unit IMU, which may include, but is not limited to: acceleration data, gyroscope data, and magnetometer data. Wherein the acceleration data is acceleration data in each direction in three-dimensional space of the object acquired by three-axis accelerometers in the IMU, the gyroscope data is angular velocity data in each direction of the object with respect to a navigation coordinate system acquired by three-axis gyroscopes in the IMU, and the magnetometer data is strength and direction data of a magnetic field measured by three-axis magnetometers in the IMU.
Step S602, the original collected data is processed to obtain the attitude data of the ship body.
Specifically, the attitude data of the hull can be obtained by filtering and fusing the original collected data of the hull collected by the IMU
Wherein rho represents the pitch angle of the ship body, the pitch angle of the ship body is the included angle between the X axis of the ship body and the horizontal plane,
the roll angle of the ship body is shown, and the roll angle of the ship body is the included angle between the Y axis of the ship body and the horizontal plane.
Please refer to fig. 7, which is a schematic flow chart of another wind speed and direction measuring method according to an embodiment of the present application, and as shown in fig. 7, the step S303 includes:
and step S701, inputting the target image sequence and the attitude data into a wind measurement algorithm model to obtain vector data of natural wind relative to the ship body.
Specifically, because the image acquisition unit acquires the image of the airflow rope, and the airflow rope is arranged with the ship body, the target image sequence of the airflow rope and the attitude data of the ship body are acquired
Inputting the data into a wind measurement algorithm model obtained by pre-training to obtain vector data of natural wind relative to the ship body
U represents the wind power of the hull in the X-axis direction, the positive direction of the X-axis is the direction in which the bow points, v represents the wind power of the hull in the Y-axis direction, the Y-axis is the transverse direction of the hull, and it should be noted that the influence of the pitch direction is ignored here, that is, the wind power of the Z-axis is ignored, and the positive direction of the Z-axis is the direction toward the sky.
In order to obtain the real wind speed and direction information, the wind vector data of the natural wind relative to the geographic coordinate system needs to be obtained.
Step S702, processing the original collected data collected by the inertia measurement unit by using a Runge Kutta method to obtain a direction cosine matrix composed of quaternions and quaternions.
Further, in order to obtain wind vector data of natural wind relative to a geographic coordinate system, a longge library tower method can be used for processing the original collected data collected by the IMU to obtain a quaternion Q (Q)0,q1,q2,q3) And by quaternion Q (Q)0,q1,q2,q3) The direction cosine matrix of:
wherein the quaternion Q is composed of four elements Q0,q1,q2,q3Number of formation, q0,q1,q2,q3The method is a real number, and the Longge Kutta method (Runge-Kutta, RK method for short) is a set of ordinary differential equation solvers, and a direction cosine matrix Deltat is used for representing the rotation direction of a ship body relative to a geographical coordinate system.
And step S703, multiplying the inverse matrix of the direction cosine matrix by the vector data to obtain the wind vector data under the geographic coordinate system.
Further, performing inverse operation on the directional cosine matrix delta t to obtain an inverse matrix of the directional cosine matrix delta t, and then performing vector data of the inverse matrix of the directional cosine matrix and the natural wind relative to the ship body
Multiplying, namely obtaining wind vector data under a geographic coordinate system
The wind power of the geographic coordinate system is determined by the wind power of the geographic coordinate system, wherein U represents the wind power in the X-axis direction of the geographic coordinate system, the forward direction of the X-axis is the east direction, V represents the wind power in the Y-axis direction of the geographic coordinate system, and the forward direction of the Y-axis is the north direction.
Step S704, determining wind speed and wind direction according to the wind vector data.
In particular, from wind vector data
The wind speed S and the wind direction θ can be calculated by the following formula:
based on the same inventive concept, the embodiment of the present application further provides a wind speed and direction measuring device corresponding to the wind speed and direction measuring method, and as the principle of solving the problem of the device in the embodiment of the present application is similar to that of the wind speed and direction measuring method in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and repeated details are not repeated.
Referring to fig. 8, it is a schematic structural diagram of an anemometry apparatus provided in an embodiment of the present application, where the anemometry apparatus is applied to a controller in the anemometry system, as shown in fig. 8, the apparatus includes:
the first obtainingmodule 801 is configured to obtain a target image sequence of each airflow rope, where the target image sequence includes multiple frames of images, and is acquired by an image acquisition unit.
A second obtainingmodule 802, configured to obtain attitude data of the hull collected by the inertial measurement unit, where the attitude data includes a direction of the hull, a roll angle of the hull, and a pitch angle of the hull.
And theprocessing module 803 is configured to input the target image sequence and the attitude data into a pre-obtained wind measurement algorithm model, so as to obtain wind speed and wind direction information in the current environment where the ship body is located.
In a possible implementation, the first obtainingmodule 801 is specifically configured to:
acquiring an original image sequence of the airflow rope acquired by an image acquisition unit under the blowing of natural wind; and respectively preprocessing each image in the original image sequence to obtain a target image sequence.
In a possible implementation manner, the second obtainingmodule 802 is specifically configured to:
acquiring original acquisition data of a ship body acquired by an inertia measurement unit; and processing the original collected data to obtain the attitude data of the ship body.
In a possible implementation, theprocessing module 803 is specifically configured to:
inputting the target image sequence and the attitude data into a wind measurement algorithm model to obtain vector data of natural wind relative to the ship body; and determining wind speed and wind direction information according to the vector data.
In a possible implementation, theprocessing module 803 is further specifically configured to:
processing the original acquisition data acquired by the inertia measurement unit by using a Longge Kutta method to obtain a direction cosine matrix consisting of quaternions and quaternions, wherein the direction cosine matrix is used for representing the rotation direction of the ship body relative to a geographic coordinate system; multiplying the vector data by the inverse matrix of the direction cosine matrix to obtain wind vector data under a geographic coordinate system; and determining the wind speed and the wind direction according to the wind vector data.
The above apparatus is configured to execute the method provided in the foregoing embodiment, and for the description of the processing flow of each module in the apparatus and the interaction flow between each module, reference may be made to the relevant description in the foregoing method embodiment, which is not described herein again.
These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, when one of the above modules is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Anelectronic device 900 is further provided in the embodiment of the present application, as shown in fig. 9, which is a schematic structural diagram of theelectronic device 900 provided in the embodiment of the present application, and theelectronic device 900 may be a controller in the foregoing method embodiment, or may be a device including the controller. Referring to fig. 9, the electronic device includes: aprocessor 901, amemory 902, and abus 903. Thememory 902 stores machine-readable instructions executable by theprocessor 901, theprocessor 901 and thememory 902 communicate via thebus 903 when theelectronic device 900 is running, and the machine-readable instructions when executed by theprocessor 901 perform the method steps in the wind speed and direction measurement method embodiments described above.
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the method steps in the wind speed and direction measurement method embodiment.
Specifically, the storage medium can be a general-purpose storage medium, such as a removable disk, a hard disk, or the like, and when executed, the computer program on the storage medium can execute the wind speed and direction measuring method embodiments described above.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to perform some steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.