Tunnel parking detection system and method based on geomagnetic sensor
By arranging multiple geomagnetic sensors in the tunnel, collecting and processing geomagnetic data, calculating the reference value and magnetic field intensity fluctuation value, and combining the environment and parking reference values, it is possible to accurately judge the parking behavior of vehicles in the tunnel and solve the problems in the existing technology. It solves the problem of insufficient detection sensitivity and accuracy and is suitable for full tunnel parking detection.
Patent Information
- Application Number
- CN202410932944.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-07-12
AI Technical Summary
The existing parking detection technology based on geomagnetic sensors is difficult to effectively detect the parking behavior of vehicles in tunnels, especially in environments with poor lighting and unstable vehicle positions. The detection sensitivity and front-end sensing data quality are insufficient to meet the needs of all vehicles. Tunnel detection requirements.
By setting the sampling frequency and average window length, the geomagnetic sensor data is collected and processed, the reference value and magnetic field intensity fluctuation value are calculated, and the parking status of the vehicle is determined based on the environmental reference value and the parking reference value, and the judgment is made through the fusion of multiple geomagnetic sensors. Achieve accurate judgment on the parking behavior of various types of vehicles at any location in the tunnel.
It improves the accuracy and sensitivity of detection, can accurately judge the parking behavior of vehicles within the entire tunnel, extends the detection range, reduces the risk of false triggering, and is suitable for large-scale promotion and application.
Smart Images

Figure CN118471016B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of traffic technology, relates to tunnel parking detection technology, and specifically relates to a tunnel parking detection system and method based on a geomagnetic sensor. Background Art
[0002] Parking on the road in relatively closed and poorly lit tunnels, especially random parking in tunnels on highways, can easily lead to traffic accidents and is a major safety hazard in highway driving. If you are not reminded in time, it will easily cause traffic congestion on the one hand, and increase the risk of traffic accidents on the other.
[0003] There are many types of vehicle detectors on the market, but for vehicle structures, geomagnetic sensors are better front-end sensing devices. The current parking detection method based on geomagnetic sensors is mainly aimed at parking detection of parking spaces. The detection range is relatively fixed, and it only needs to determine whether the geomagnetic data offset exceeds the threshold within the preset time. However, for the detection environment of the entire tunnel, this detection method has limitations. There will be different types of vehicles driving in the tunnel, and the parking positions are not fixed. Vehicles can park anywhere at any time. The detection range is difficult to fix, and there are high requirements for strong detection sensitivity and front-end perception data quality. The existing parking detection technology for parking spaces cannot meet the requirements. Summary of the invention
[0004] In order to overcome the technical defects of the prior art, the present invention discloses a tunnel parking detection system and method based on a geomagnetic sensor.
[0005] The tunnel parking detection method based on the geomagnetic sensor of the present invention comprises the following steps:
[0006] Step 1. Set the sampling frequency fs to collect the original geomagnetic data, set the average window length w, where w≤fs, and perform an average calculation on every w data to obtain the average value data as the purified geomagnetic data ;
[0007] Step 2. Calculate and update the benchmark value, specifically:
[0008] Step 21. Stable state determination;
[0009] It is considered that the purified geomagnetic data at the current moment If the data is in a stable state, the process proceeds to step 22, and step 21 is repeated for the subsequent purified geomagnetic data;
[0010] Otherwise, do not proceed to step 22. If the current time is not the initial state, proceed to step 31. Otherwise, continue to repeat step 21 for the subsequent purified geomagnetic data.
[0011] Step 22. Based on the purified geomagnetic data Calculate the current base value base;
[0012] Step 23. Baseline value determination;
[0013] Set the environmental reference value EB for calculating the magnetic field offset; the parking reference value PB for judging parking behavior;
[0014] If it is the initial state: the current reference value calculated in step 22 is set as the environmental reference value, wherein the initial state is a state where there is no vehicle in the entire tunnel and the initial environmental reference value is not obtained;
[0015] If it is not the initial state;
[0016] If the current state of the geomagnetic sensor is a vehicle-free state, then an environmental reference value update judgment is performed;
[0017] The environmental reference value EB is updated and determined as:
[0018] For the current geomagnetic sensor sensor i , the two geomagnetic sensors before and after are denoted as sensor i+1 and sensor i-1 ; If sensor i+1 and sensor i-1 If both geomagnetic sensors are not in the vehicle state, update the geomagnetic sensor sensor i The environmental reference value is the current reference value calculated in step 22;
[0019] That is, update the environmental baseline value EB=base;
[0020] Otherwise, the current environmental baseline value is not updated;
[0021] If the current state of the geomagnetic sensor is other than the no-car state, the current reference value is the parking reference value;
[0022] Update parking base value PB=base;
[0023] Step 3: Parking status detection;
[0024] Step 31. Calculate the magnetic field intensity fluctuation value ΔB.
[0025] Define the intensity fluctuation value ΔB:
[0026] ,
[0027] is the current purified geomagnetic data, EB is the environmental baseline value;
[0028] Step 32. Determine the detection status;
[0029] Step 321. If there is no vehicle currently, perform vehicle entry monitoring;
[0030] If ΔB is greater than the parking trigger threshold THSTOP, it is considered that a vehicle has entered and the vehicle enters the vehicle state; otherwise, it continues to remain in the vehicle-free state;
[0031] Step 322. If the vehicle is currently in the vehicle state, monitor the duration of data fluctuation;
[0032] If ΔB is greater than the parking judgment threshold THSS=0.5*THSTOP, and the continuous uninterrupted time exceeds the parking time trigger threshold THT, it enters the parking suspected detection state; otherwise it returns to the no-car state;
[0033] Step 323. If the vehicle is currently in a suspected parking detection state, make a parking judgment; if the vehicle is currently in a parking detection state, make a parking end judgment;
[0034] If there is a parking reference value PB in the most recently performed step 2, and the difference between PB and the most recently updated environment reference value EB is greater than or equal to the difference threshold THBASE, then the parking detection state is entered;
[0035] If the difference is less than THBASE, it returns to the car-free state;
[0036] If there is no parking reference value PB, it is determined whether ΔB is less than the parking determination threshold THSST, if so, it returns to the no-car state;
[0037] Otherwise, continue to return to step 2 in the current state to update the parking reference value PB, and detect the parking reference value PB until the difference between the parking reference value PB and the environmental reference value EB is less than the difference threshold THBASE, then it is considered that the parking is completed and the state returns to the no-car state;
[0038] In step 3, the suspected parking detection state and the parking detection state both belong to the vehicle-occupied state.
[0039] Preferably, the step 1 further includes purifying the original data, specifically including the following steps:
[0040] Step 11. Collect the original data of geomagnetic variation of the geomagnetic sensor in the x, y, and z axes;
[0041] Step 12. The original geomagnetic data x at time t t ,y t 、z tFiltering is performed, specifically: set the average window length w, where w≤fs, and perform an average calculation on each axis for every w data to obtain the average value data of the axis, recorded as ; fs is the sampling frequency in step 11;
[0042] Step 13. Data quality assessment;
[0043] Perform statistical analysis on the data of the previous n seconds and calculate the fluctuation range of the three axes during this period;
[0044] x-axis fluctuation value wave x The calculation formula is as follows:
[0045] wave x =max(X)-min(X),
[0046] ,
[0047] Where X is the data set after window filtering in step 12 for all data within the initial n seconds of the x-axis. The subscript indicates the window number; max indicates the maximum value, and min indicates the minimum value.
[0048] The calculation method of the geomagnetic data of the y-axis and z-axis is the same as the above method in step 13, recorded as wave y 、wave z ; Compare the fluctuation results of the three axes and obtain the axis with the largest fluctuation data:
[0049] bad axis =argmax(wave x ,wave y , wave z ), bad axis ∈{x,y,z}
[0050] Step 14. Magnetic field strength conversion;
[0051] After the data quality judgment is completed, the average value data of the axis where the data with the largest fluctuation is located is removed, and the remaining two axis filtered data are converted into magnetic field intensity. The conversion formula is:
[0052] ;
[0053] express The average value of the axis where the data with the largest fluctuation is located; after conversion This is the purified geomagnetic data with interference removed.
[0054] Preferably, the step 21 specifically includes: setting a reference strength list B of size N, storing magnetic field strength value data for m consecutive seconds into the reference strength list B; and performing a stable state judgment once the list is full;
[0055] To determine whether the data is in a stable state, calculate the stable value:
[0056] ;
[0057] in, is the lth cleaned geomagnetic data stored in the benchmark intensity list B, B is the benchmark intensity list, N is the size of the benchmark intensity list, m is the acquisition time length, fs is the sampling frequency, and w is the window size;
[0058] If the steady value steady is less than the set steady threshold value THSTDY, the data at this moment is considered to be in a stable state, and then the process goes to step 22 and clears the reference intensity list B, and repeats step 21 for subsequent magnetic field intensity value data;
[0059] Otherwise, step 22 is not entered and the reference intensity list B is cleared, and step 21 is repeated for subsequent magnetic field intensity value data.
[0060] Preferably, the current reference value calculation formula in step 22 is:
[0061] ,
[0062] represents the lth purified geomagnetic data stored in the reference intensity list B, It means summing all N purified geomagnetic data in the baseline intensity list.
[0063] Preferably, the data of all geomagnetic sensors are detected through steps 1 to 3, and an accident threshold value VACT is set. When the number of continuously distributed geomagnetic sensors greater than the accident threshold value VACT enters the parking detection state, an accident alarm is triggered.
[0064] The tunnel parking detection system based on geomagnetic sensors comprises a plurality of geomagnetic sensors arranged at equal intervals in the tunnel, each geomagnetic sensor is connected to a processor via a signal line, and the processor can execute the tunnel parking detection method based on geomagnetic sensors.
[0065] Preferably, the processor is also connected to an alarm device.
[0066] The present invention switches between different states by real-time monitoring of the offset of geomagnetic data, and then makes parking behavior judgments based on the degree of deviation of the geomagnetic reference value when there is a car and when there is no car. It can make accurate judgments on the parking behavior of vehicles of any type and at any location in the tunnel. The present invention combines the detection results of multiple devices for fusion judgment, ensures the detection accuracy while extending the detection range, and effectively solves the demand for parking detection in the entire tunnel. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 A schematic diagram of a specific implementation of the tunnel parking detection method of the present invention;
[0068] Figure 2 A schematic diagram of a specific situation in which the environmental reference value update judgment is performed in step 23 of the present invention;
[0069] Figure 3 This is a typical curve diagram of the real-time geomagnetic change when a vehicle enters the area near the geomagnetic sensor and stops. Figure 3 The horizontal axis is time, and the vertical axis is the geomagnetic intensity;
[0070] Figure 4 A schematic diagram of a specific implementation method of each stage of the geomagnetic change curve corresponding to each state in the present invention;
[0071] Figure 5 This is a typical curve diagram of the real-time geomagnetic change in the X direction when the vehicle passes through the area near the geomagnetic sensor in the forward and reverse directions. Figure 5 The horizontal axis is time and the vertical axis is the geomagnetic intensity. DETAILED DESCRIPTION
[0072] The specific implementation modes of the present invention will be further described in detail below in conjunction with the accompanying drawings.
[0073] The tunnel parking detection method based on geomagnetic sensors of the present invention requires that, before detection, the geomagnetic sensors be arranged at equal intervals of a length L in a tunnel without a vehicle. The arrangement location is usually the central axis of each lane in the tunnel. Each geomagnetic sensor is connected to a processor via a signal line, and the real-time geomagnetic changes of the geomagnetic sensors are transmitted to the processor for data analysis and processing.
[0074] The detection method is as Figure 1 As shown, the following steps are included:
[0075] Step 1. Raw data collection and processing
[0076] Step 11. Collect the original geomagnetic data of the geomagnetic sensor in the x, y, and z axes at a sampling frequency of 100 Hz.
[0077] Step 12. Input the original data x of the three-axis geomagnetic quantity at time t t ,y t 、z t Filtering is performed, specifically:
[0078] Taking into account the calculation speed, the three-axis original geomagnetic data are window averaged, and the average window length is set to w, where w≤fs. For each axis, an average calculation is performed every w consecutive data, which is recorded as .
[0079] Step 13. Data quality assessment.
[0080] In actual applications, due to problems such as sensor installation technology, the data collection of a certain axis may be unstable. If this axis data is added for parking judgment, it will affect the final test results. Therefore, before entering the test, it is necessary to filter out good quality data.
[0081] Specifically, in the initial state, the data of the first n seconds are statistically analyzed, and the fluctuation ranges of the three axes during this period are calculated respectively.
[0082] Taking the x-axis as an example, the calculation of the x-axis fluctuation value is:
[0083] wave x =max(X)-min(X),
[0084] ,
[0085] Where X is the data set after window filtering in step 12 for all data within the initial n seconds of the x-axis. The subscript indicates the sequence number of the window. For a time length of n seconds, there are a total of n*fs / w windows. For those that cannot be divided evenly, the last data less than w can be discarded; max means finding the maximum value, and min means finding the minimum value.
[0086] The calculation method for the other two axes is the same, recorded as wave y 、wave z Compare the fluctuation results of the three axes and obtain the data axis with the largest fluctuation:
[0087] bad axis =argmax(wave x ,wave y , wave z ), bad axis ∈{x,y,z};
[0088] Step 14. Magnetic field intensity conversion. After the data quality judgment is completed, the more stable two-axis filtered data is converted into magnetic field intensity, that is, the original geomagnetic data of the axis with the largest fluctuation result is removed. The conversion formula is:
[0089] ;
[0090] Converted The purified geomagnetic data has been freed of interference. express The average value data of the axis where the data with the largest fluctuation is located;
[0091] Step 2: Calculate and update the baseline value.
[0092] The geomagnetic sensor determines whether a vehicle is present based on the sudden shift in magnetic field strength. In order to obtain the offset of magnetic field strength, the magnetic field strength without vehicle disturbance in the current environment needs to be used as the environmental reference value, and the measured geomagnetic strength minus the environmental reference value is used to obtain the offset of the magnetic field at the current moment.
[0093] If a parking event occurs, the magnetic field strength will stabilize in a range for a period of time, forming a new baseline. The magnetic field strength value corresponding to the new baseline is called the parking baseline value. There is a certain gap between the parking baseline value and the environmental baseline value. When parking is completed and the vehicle leaves, the magnetic field strength value will return to near the environmental baseline value when there is no car.
[0094] The present invention sets two types of reference values, namely, an environmental reference value EB, which is used for calculating the magnetic field offset; and a parking reference value PB, which is used for judging parking behavior.
[0095] Step 21. Set a reference strength list B of size N to store magnetic field strength value data for m consecutive seconds. If the data stored for m consecutive seconds is in a stable state, perform a reference value calculation.
[0096] To evaluate whether the data is in a stable state, the stable value steady is used, and the formula is:
[0097]
[0098] in, is the lth geomagnetic intensity value data stored in the reference intensity list B, B is the reference intensity list, N is the size of the reference intensity list, m is the acquisition time length, fs is the sampling frequency, and w is the window size (w≤fs). In a specific embodiment, m is 2, fs is 100 Hz, and w is 20;
[0099] If the steady value steady is less than the set steady threshold value THSTDY, it is considered to be in a stable state, and then the process goes to step 22 and clears the reference strength list B to continue subsequent data storage; otherwise, the process does not go to step 22 and clears the reference strength list B to continue subsequent data storage and repeat step 21.
[0100] Step 22. Calculate the baseline value.
[0101] If the steady value steady is less than the set stability threshold THSTDY, the data is considered to be in a stable state at that moment. The current base value base can be calculated using the formula:
[0102] ;
[0103] is the lth geomagnetic intensity value data stored in the reference intensity list B, B is the reference intensity list, and N is the size of the reference intensity list; It means to sum all N geomagnetic intensity values in the reference intensity list;
[0104] By setting the reference strength list, the noise signal received by the geomagnetic sensor can be filtered out, and the detection values over a period of time can be comprehensively evaluated to avoid misjudgment. The geomagnetic change curve on the X-axis caused by the high-speed vehicle driving in is as follows: Figure 5 It shows a spike pulse. The geomagnetic variation curves of the Y-axis and Z-axis are similar to those of the X-axis. A sharp change in the geomagnetic intensity value at a single point or in a short period of time does not mean that a parking phenomenon has occurred. Only by comprehensively evaluating the detection values over a long period of time can it be accurately determined whether a parking phenomenon has occurred.
[0105] Step 23. Baseline value judgment. Determine whether there is a car in the current geomagnetic sensor detection area.
[0106] The current detection status is no car status;
[0107] If it is the initial state: the current reference value calculated in step 22 is set as the environmental reference value, wherein the initial state is a state where there is no vehicle in the entire tunnel and the initial environmental reference value is not obtained;
[0108] For the normal non-initial state: the environmental reference value is updated and judged.
[0109] The environmental baseline value is used to measure the offset of the magnetic field data. Since parking events can occur at any position in the entire tunnel, it is easy for the sensor baseline near the parking detection boundary to be raised. For example, if a vehicle stops between sensors 1 and 2, it is closer to sensor 2. Due to the distance, the change in the magnetic field strength of sensor 1 is relatively weak. Although there is a change, it does not trigger the vehicle status. At this time, after stabilization, the environmental baseline value of sensor 1 will gradually be updated to the value when the magnetic field is added over time, that is, the environmental baseline value is raised, which will cause detection confusion. Therefore, in order to solve this problem, the detection conditions of other sensors will be combined for fusion judgment.
[0110] like Figure 2 As shown in the figure, for the current geomagnetic sensor SS(i), the two geomagnetic sensors before and after it are recorded as SS(i-1) and SS(i+1). If both geomagnetic sensors SS(i-1) and SS(i+1) have not entered the vehicle state, it means that no vehicle has entered the detection area corresponding to the adjacent sensors, and the environmental reference value of the geomagnetic sensor SS(i) is updated. If a parking event occurs in one of them, it means that the currently detected environmental reference value is affected by the nearby geomagnetic sensors, and the current environmental reference value is not updated.
[0111] Each time the environmental reference value is updated, it indicates that the vehicle has left and the previously existing parking reference value is cleared to avoid subsequent misjudgment.
[0112] If the current detection state is other than the no-vehicle state, the current reference value obtained by the current detection is the parking reference value PB which is equal to the current reference value base.
[0113] Through step 2, the state of the geomagnetic intensity value data of each geomagnetic sensor within a period of time is judged and calculated and updated as an environmental reference value or a parking reference value, thereby providing a judgment basis for the state change reflected by the geomagnetic intensity value data of the geomagnetic sensor.
[0114] The geomagnetic intensity value may change slowly with the ambient temperature, the working state of the geomagnetic sensor itself, etc. Continuously updating the environmental reference value can effectively avoid the judgment bias caused by the overall slow shift of the geomagnetic intensity value due to temperature or environmental changes. At the same time, the changes in geomagnetic intensity values caused by vehicles of different sizes are also different, usually proportional to the vehicle size and metal mass. By updating the parking reference value, accurate relative judgment of the geomagnetic offset caused by vehicles of different sizes can be achieved.
[0115] Step 3: Parking detection.
[0116] For each geomagnetic sensor, within its sensing range, there are states of no vehicle and state of vehicle presence. In the state of vehicle presence, within a certain detection time, the behavior of the vehicle within the sensing range may be the following real states: state 1. normal driving; state 2. driving into and parking within the sensing range; state 3. parking within the sensing range and then driving out of the sensing range again; state 4. continuously parking within the sensing range;
[0117] In this step, the suspected parking detection state and the parking detection state both belong to the vehicle-occupied state.
[0118] In order to identify the different real states 1 to 4, the following calculation decisions are performed.
[0119] Step 31. Calculate the magnetic field intensity fluctuation value ΔB. In order to evaluate the magnetic field intensity In the case of an offset, the intensity fluctuation value ΔB is defined as:
[0120] , is the current magnetic field strength value
[0121] EB is the environmental reference value.
[0122] Step 32: Determine the detection status.
[0123] Step 321: If there is no vehicle currently, perform vehicle entry monitoring.
[0124] If ΔB is greater than the parking trigger threshold THSTOP, it is considered that a vehicle has entered and the vehicle enters the vehicle state; otherwise, it continues to be the vehicle-free state;
[0125] Step 322. If the vehicle is currently in the vehicle status, monitor the duration of data fluctuation.
[0126] If ΔB is greater than the parking judgment threshold THSST=0.5*THSTOP, and the continuous time exceeds the parking time trigger threshold THT, it is considered that there is a suspected vehicle parking and enters the suspected parking detection state; otherwise, it indicates the following two situations:
[0127] 1. The intensity fluctuation value does not meet the requirement. This may be caused by the passing of a nearby vehicle, but no vehicle has entered the local area.
[0128] 2. Although the vehicle enters the local area and the intensity fluctuation value meets the standard, the duration is insufficient. The corresponding state is state 1, that is, the vehicle passes the local area normally without stopping;
[0129] The parking judgment threshold THSST is usually smaller than the parking trigger threshold THSTOP. This is because when the vehicle enters, the magnetic field fluctuation is initially the largest. A typical curve is as follows: Figure 3When a vehicle passes by quickly, the geomagnetic field may fluctuate slightly. In particular, when a vehicle passes by quickly in the opposite direction, the magnetic field intensity fluctuation value in a certain direction may be rapidly reduced to a value smaller than the change in magnetic field intensity when there is no vehicle to a vehicle, as shown in the figure below. Figure 5 As shown, the vehicle travels in the X-axis direction. Figure 5 The two curves on the left and right are the geomagnetic change curves when vehicles enter in the forward and reverse directions respectively. The change directions on the X-axis caused by vehicles entering in different directions are opposite. If a vehicle enters the reverse lane, the geomagnetic field change in the forward lane will be reduced after superposition. However, the vehicle still enters the magnetic field detection area at this time. Therefore, it is necessary to set the parking judgment threshold THSST to be less than the parking trigger threshold THSTOP in order to continue the subsequent judgment.
[0130] The above two states both indicate that there is no car locally, that is, the system returns to a car-free state.
[0131] When the intensity fluctuation value reaches the requirement and the duration exceeds the parking time trigger threshold, it is necessary to judge the possible states 2, 3, and 4, that is, enter the suspected parking detection state.
[0132] Step 323. If the vehicle is currently in a suspected parking detection state, make a parking determination.
[0133] Based on the existing benchmark value, the status before the current time is judged.
[0134] If there is a parking reference value in the most recent step 2, it means that the vehicle has been judged to be in a state of parking before the current time.
[0135] If there is a parking reference value PB, and the difference between the parking reference value PB and the most recently updated environmental reference value EB is greater than or equal to the difference threshold THBASE, then it is considered that a parking event has occurred and the parking detection state is entered. If there is a vehicle in the detection area at least from the parking reference value detected in step 2 to the current time period, then the parking detection state is entered, which corresponds to real state 2 - the vehicle enters and parks in the detection area;
[0136] If the difference between the parking reference value PB and the most recently updated environmental reference value EB is less than the difference threshold THBASE, it means that the parking reference value continuously updated in the vehicle state has been reduced to the same level as the most recently updated environmental reference value EB before parking. The parking reference value is not caused by parking, but may be caused by sensor data baseline drift and other reasons, indicating that the vehicle has left the detection area, and the system returns to the vehicle-free state.
[0137] If there is no parking reference value PB, it means that in the last detection time period, that is, in the continuous m seconds of magnetic field strength value data stored in the last reference strength list B, the data for calculating the reference value is not in a stable state, so there is no parking reference value, corresponding to the real state 2-the vehicle enters and may park in the detection area. At this time, the data is not stable, which may indicate that there are continuous vehicles entering and leaving, which is generally a traffic congestion situation.
[0138] The analysis of the non-existence of the parking benchmark value PB is based on the fact that the vehicle brakes suddenly in the detection area and may accelerate away quickly after the sudden braking. The corresponding braking deceleration time is short, and the vehicle directly enters the vehicle state from the no-vehicle state during the current detection time period and quickly leaves the detection area. The above scenario generally occurs in traffic congestion. Although the intensity fluctuation value meets the requirements and the duration exceeds the parking time trigger threshold, this may also be caused by continuous traffic. The intensity fluctuation value has been fluctuating at a high level and has not stabilized, and it is not a real parking.
[0139] To avoid misjudgment of parking, the parking reference value PB needs to be continuously monitored. If during the monitoring period, ΔB is less than the parking judgment threshold THSST=0.5*THSTOP in the current detection time period, it means that the vehicle has left the detection area, corresponding to state 3, and returns to the no-vehicle state. Otherwise, it means that there has been a vehicle passing by, and it continues to be in the suspected parking detection state, and continues to detect whether ΔB is less than the parking judgment threshold THSST=0.5*THSTOP in the current detection time period.
[0140] When it is detected that the parking detection state has been entered, it indicates that parking has occurred, corresponding to state 4. The processor may be connected to an alarm device, which is generally evenly arranged in the tunnel. The alarm device may be a combination of a horn, a warning light, etc. After the parking detection state is detected, the alarm device at the corresponding position is turned on to prompt the driver to leave immediately or place a tripod behind the car.
[0141] Usually the default initial detection state is the no-car state; for the setting of related parameters, the parking trigger threshold THSTOP needs to be determined according to the actual parking detection range, and the current value is 30; the parking time trigger threshold THT can be configured according to the actual situation, and the current value is 10s; the gap threshold THBASE can be configured to 0.6 times THSTOP.
[0142] Figure 4 A state switching diagram of a geomagnetic sensor is given when a vehicle enters the detection area of the geomagnetic sensor. The horizontal axis in the diagram is time, and the vertical axis is the geomagnetic intensity fluctuation value. Figure 4Each rectangular window in the figure represents all data points stored in a benchmark strength calculation list B. The size of each benchmark strength calculation list B is 10, that is, 2 seconds of data. THSTDY is a stable threshold of 10. In the figure, there are 10 data points in each rectangular window.
[0143] In window B1, the geomagnetic intensity fluctuation value remains low, and it is considered that there is no car. At the same time, in window B1, the stability value is less than the set stability threshold THSTDY, and the data is in a stable state and is in the initial state. Then the current reference value is calculated and updated to the latest environmental reference value. At this time, there is no parking reference value;
[0144] In window B2, due to the vehicle entering, the geomagnetic intensity fluctuation value rises rapidly, and exceeds the set parking trigger threshold THSTOP at time T1, and it is considered that a vehicle is entering, and the vehicle enters the state. During the window B2 time period, the stable value is greater than the set stable threshold THSTDY, and the benchmark value is not updated;
[0145] In window B3, the vehicle is located in the detection area, so that the geomagnetic intensity fluctuation value is stably maintained at a high level. Since the system has switched to the vehicle-in-use state in the previous window B2, the data fluctuation duration is monitored. However, within the range covered by window B3, the continuous uninterrupted time does not exceed the parking time trigger threshold THT, so the vehicle-in-use state is maintained;
[0146] At the same time, during the window B3 period, if the stability value is less than the set stability threshold THSTDY and the system has switched to the car-in state, the current reference value base is calculated and updated to the parking reference value;
[0147] At time point T2 in window B4, the continuous uninterrupted time exceeds the parking time trigger threshold THT, and enters the parking suspected detection state;
[0148] At the same time, during the window B4 time period, if the stability value is less than the set stability threshold THSTDY and the system has switched to the car-in state, the current reference value base is calculated and continued to be updated to the new parking reference value;
[0149] In the time period of window B5, since there are parking reference values in windows B3 and B4, and the parking suspected detection state has been entered in the time period of window B4, and the parking reference value PB calculated in the time period of window B5 is greater than the environmental reference value obtained in window B1, the system enters the parking detection stage in the time period of window B5, and it is considered that the parking time continues; the parking reference value continues to be updated;
[0150] During the time period of window B6, the vehicle starts to drive out, and the geomagnetic intensity fluctuation value decreases rapidly. Since there is a vehicle, the parking reference value continues to be updated during this window period. However, although the difference between the calculated parking reference value PB and the most recently updated environmental reference value EB decreases, it may still be greater than THBASE. The system state does not switch and remains in the parking detection stage.
[0151] During the time period of window B7, the vehicle is completely driven out and the geomagnetic intensity fluctuation value remains at a low level. Since there is a car, during this window period, the difference between the calculated parking reference value PB and the most recently updated environmental reference value EB is less than THBASE. At time point T3 when window B7 ends, the system state is switched to a car-free state; since there is a car, no new environmental reference value is generated at this time.
[0152] During the time period of window B8, the geomagnetic intensity fluctuation value remains at a low level and meets the stability requirements. Since there is no car, the calculated benchmark value base is updated to the latest environmental benchmark value during this window period, and the previous parking benchmark value is cleared, and the system state is maintained in a car-free state.
[0153] When multiple continuously distributed geomagnetic sensors enter the stop detection state, it means that a traffic accident is likely to occur. An accident threshold value VACT is set. When continuously distributed geomagnetic sensors greater than the accident threshold value VACT enter the stop detection state, an accident alarm is triggered. Through the judgment of geomagnetic sensors and stop detection, it can be judged whether a traffic accident has occurred in the tunnel.
[0154] The present invention integrates the parking event detection results of multiple devices and previous and subsequent time periods to prevent the reference value from being updated incorrectly, reduce the risk of false triggering, and improve the accuracy of long-term detection; in the judgment of parking behavior, a variety of detection states are designed, and it is necessary to switch between different states to reach a judgment on the parking behavior. The parking behavior is determined by comparing the deviation of the geomagnetic reference value in the presence of a car and in the absence of a car, which further improves the robustness of the detection.
[0155] The parking detection method of the present invention has the advantages of low cost, low complexity and stable operation, meets the needs of full tunnel layout detection, and is suitable for large-scale promotion and application.
[0156] The foregoing is a preferred embodiment of the present invention. If the implementation methods in the preferred embodiment are not obviously self-contradictory or based on a preferred implementation method, each preferred implementation method can be arbitrarily superimposed and used in combination. The embodiments and specific parameters in the embodiments are only for the purpose of clearly describing the invention verification process of the inventor, and are not intended to limit the scope of patent protection of the present invention. The scope of patent protection of the present invention shall still be subject to its claims, and any equivalent structural changes made using the contents of the specification and drawings of the present invention shall be included in the scope of protection of the present invention.
Claims
1. A tunnel parking detection method based on a geomagnetic sensor, characterized in that: The following steps are involved: Step 1. Set the sampling frequency fs to collect the original geomagnetic data, set the average window length w, where w≤fs, and perform an average calculation on every w data to obtain the average value data as the purified geomagnetic data ; Step 2. Calculate and update the benchmark value, specifically: Step 21. Stable state determination; It is considered that the purified geomagnetic data at the current moment If the data is in a stable state, the process proceeds to step 22, and step 21 is repeated for the subsequent purified geomagnetic data; Otherwise, do not proceed to step 22. If the current time is not the initial state, proceed to step 31. Otherwise, continue to repeat step 21 for the subsequent purified geomagnetic data. Step 22. Based on the purified geomagnetic data Calculate the current base value base; Step 23. Baseline value determination; Set the environmental reference value EB for calculating the magnetic field offset; The parking reference value PB is used to judge parking behavior; If it is the initial state: the current reference value calculated in step 22 is set as the environmental reference value, wherein the initial state is a state where there is no vehicle in the entire tunnel and the initial environmental reference value is not obtained; If it is not the initial state: If the current state of the geomagnetic sensor is a vehicle-free state, then an environmental reference value update judgment is performed; The environmental reference value EB is updated and determined as: For the current geomagnetic sensor sensor i , the two geomagnetic sensors before and after are denoted as sensor i+1 and sensor i-1 ; If sensor i+1 and sensor i-1 If both geomagnetic sensors are not in the vehicle state, update the geomagnetic sensor sensor i The environmental reference value is the current reference value calculated in step 22; That is, update the environmental baseline value EB=base; Otherwise, the current environmental baseline value is not updated; If the current state of the geomagnetic sensor is other than the no-car state, the current reference value is the parking reference value; Update parking base value PB=base; Step 3: Parking status detection; Step 31. Calculate the magnetic field intensity fluctuation value ΔB; Define the intensity fluctuation value ΔB: ; is the current purified geomagnetic data, EB is the environmental baseline value; Step 32. Determine the detection status; Step 321. If there is no vehicle currently, perform vehicle entry monitoring; If ΔB is greater than the parking trigger threshold THSTOP, it is considered that a vehicle has entered and the vehicle enters the vehicle state; otherwise, it continues to remain in the vehicle-free state; Step 322. If the vehicle is currently in the vehicle state, monitor the duration of data fluctuation; If ΔB is greater than the parking judgment threshold THSST=0.5*THSTOP, and the continuous uninterrupted time exceeds the parking time trigger threshold THT, the vehicle enters the parking suspected detection state; Otherwise, it returns to a car-free state; Step 323. If the vehicle is currently in a suspected parking detection state, make a parking determination; If the current state is parking detection, the parking end judgment is made; If there is a parking reference value PB in the most recently performed step 2, and the difference between PB and the most recently updated environment reference value EB is greater than or equal to the difference threshold THBASE, then the parking detection state is entered; If the difference is less than THBASE, it returns to the car-free state; If there is no parking reference value PB, it is determined whether ΔB is less than the parking determination threshold THSST, if so, it returns to the no-car state; Otherwise, continue to return to step 2 in the current state to update the parking reference value PB, and detect the parking reference value PB until the difference between the parking reference value PB and the environmental reference value EB is less than the difference threshold THBASE, then it is considered that the parking is completed and the state returns to the no-car state; In step 3, the suspected parking detection state and the parking detection state both belong to the vehicle-occupied state; The step 1 also includes purification of the original data, which specifically includes the following steps: Step 11. Collect the original data of geomagnetic variation of the geomagnetic sensor in the x, y, and z axes; Step 12. The original geomagnetic data x at time t t ,y t 、z t Filtering is performed, specifically: set the average window length w, where w≤fs, and perform an average calculation on each axis for every w data to obtain the average value data of the axis, recorded as ; fs is the sampling frequency in step 11; Step 13. Data quality assessment; Perform statistical analysis on the data of the previous n seconds and calculate the fluctuation range of the three axes during this period; x-axis fluctuation value wave x The calculation formula is as follows: , ; Where X is the data set after window filtering in step 12 for all data within the initial n seconds of the x-axis. The subscript indicates the window number; max indicates the maximum value, and min indicates the minimum value. The calculation method of the geomagnetic data of the y-axis and z-axis is the same as the above method in step 13, recorded as wave y 、wave z ; Compare the fluctuation results of the three axes and obtain the axis with the largest fluctuation data: bad axis =argmax(wave x ,wave y , wave z ), bad axis ∈{x,y,z} Step 14. Magnetic field strength conversion; After the data quality judgment is completed, the average value data of the axis where the data with the largest fluctuation is located is removed, and the remaining two axis filtered data are converted into magnetic field intensity. The conversion formula is: ; express The average value of the axis where the data with the largest fluctuation is located; after conversion This is the purified geomagnetic data with interference removed.
2. The tunnel parking detection method based on geomagnetic sensor according to claim 1, characterized in that: The step 21 specifically includes: setting a reference strength list B of size N, storing magnetic field strength value data for m consecutive seconds into the reference strength list B; and performing a stable state judgment once the list is full; To determine whether the data is in a stable state, calculate the stable value: ; in, is the lth cleaned geomagnetic data stored in the benchmark intensity list B, B is the benchmark intensity list, N is the size of the benchmark intensity list, m is the acquisition time length, fs is the sampling frequency, and w is the window size; If the steady value steady is less than the set steady threshold value THSTDY, the data at this moment is considered to be in a stable state, and then the process goes to step 22 and clears the reference intensity list B, and repeats step 21 for subsequent magnetic field intensity value data; Otherwise, step 22 is not entered and the reference intensity list B is cleared, and step 21 is repeated for subsequent magnetic field intensity value data.
3. The tunnel parking detection method based on geomagnetic sensor according to claim 2, characterized in that: The current reference value calculation formula in step 22 is: ; represents the lth purified geomagnetic data stored in the reference intensity list B, It means summing all N purified geomagnetic data in the baseline intensity list.
4. The tunnel parking detection method based on geomagnetic sensor according to claim 1, characterized in that: Through steps 1 to 3, the data of all geomagnetic sensors are detected, and an accident threshold value VACT is set. When the number of geomagnetic sensors with a continuous distribution greater than the accident threshold value VACT enters the parking detection state, an accident alarm is triggered.
5. The tunnel parking detection system based on geomagnetic sensor is characterized by: It comprises a plurality of geomagnetic sensors arranged at equal intervals in a tunnel, each geomagnetic sensor is connected to a processor via a signal line, and the processor can execute the method as claimed in any one of claims 1 to 4.
6. The tunnel parking detection system based on geomagnetic sensor as claimed in claim 5, characterized in that: The processor is also connected to an alarm device.
