WO2021097718A1 - 一种为自动驾驶提供时间源的方法及装置 - Google Patents

一种为自动驾驶提供时间源的方法及装置 Download PDF

Info

Publication number
WO2021097718A1
WO2021097718A1 PCT/CN2019/119754 CN2019119754W WO2021097718A1 WO 2021097718 A1 WO2021097718 A1 WO 2021097718A1 CN 2019119754 W CN2019119754 W CN 2019119754W WO 2021097718 A1 WO2021097718 A1 WO 2021097718A1
Authority
WO
WIPO (PCT)
Prior art keywords
frequency ratio
frequency
time
time source
historical
Prior art date
Application number
PCT/CN2019/119754
Other languages
English (en)
French (fr)
Inventor
屈明广
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2019/119754 priority Critical patent/WO2021097718A1/zh
Priority to EP19953177.3A priority patent/EP4044467A4/en
Priority to CN201980102106.3A priority patent/CN114641951A/zh
Priority to JP2022529367A priority patent/JP7385033B2/ja
Publication of WO2021097718A1 publication Critical patent/WO2021097718A1/zh
Priority to US17/748,849 priority patent/US20220278745A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B7/00Radio transmission systems, i.e. using radiation field
    • H04B7/14Relay systems
    • H04B7/15Active relay systems
    • H04B7/185Space-based or airborne stations; Stations for satellite systems
    • H04B7/1851Systems using a satellite or space-based relay
    • H04B7/18519Operations control, administration or maintenance
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0641Change of the master or reference, e.g. take-over or failure of the master
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60WCONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
    • B60W60/00Drive control systems specially adapted for autonomous road vehicles
    • B60W60/001Planning or execution of driving tasks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/06Clock generators producing several clock signals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/14Time supervision arrangements, e.g. real time clock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • H04W56/0015Synchronization between nodes one node acting as a reference for the others
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60WCONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
    • B60W2556/00Input parameters relating to data
    • B60W2556/45External transmission of data to or from the vehicle
    • B60W2556/50External transmission of data to or from the vehicle for navigation systems
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03BGENERATION OF OSCILLATIONS, DIRECTLY OR BY FREQUENCY-CHANGING, BY CIRCUITS EMPLOYING ACTIVE ELEMENTS WHICH OPERATE IN A NON-SWITCHING MANNER; GENERATION OF NOISE BY SUCH CIRCUITS
    • H03B5/00Generation of oscillations using amplifier with regenerative feedback from output to input
    • H03B5/30Generation of oscillations using amplifier with regenerative feedback from output to input with frequency-determining element being electromechanical resonator
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0644External master-clock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays

Definitions

  • This application relates to the technical field of time synchronization, and in particular to a method and device for providing a time source for automatic driving.
  • AI Artificial Intelligence
  • Autonomous driving is a mainstream application in the field of artificial intelligence.
  • Autonomous driving technology relies on the collaboration of computer vision, radar, monitoring devices, and global positioning systems to allow motor vehicles to achieve autonomous driving without the need for human active operations.
  • Self-driving vehicles use various computing systems to help transport passengers from one location to another. Some autonomous vehicles may require some initial input or continuous input from an operator (such as a navigator, driver, or passenger). The self-driving vehicle permits the operator to switch from the manual operation mode to the automatic driving mode or a mode in between. Since autonomous driving technology does not require humans to drive motor vehicles, it can theoretically effectively avoid human driving errors, reduce the occurrence of traffic accidents, and improve highway transportation efficiency. Therefore, autonomous driving technology is getting more and more attention.
  • an automatic driving system there are a large number of heterogeneous computing nodes related to automatic driving, such as various sensors, central computing nodes, microcontroller unit (MCU) control nodes, power management nodes, and safety monitoring nodes. Maintaining high-precision time synchronization between these nodes is a basic and necessary condition for the safe and reliable operation of algorithms such as perception, positioning, and fusion regulation and control of autonomous driving.
  • MCU microcontroller unit
  • autonomous driving-related nodes it is also necessary to provide accurate world standard time services for other businesses involved in the automated driving system (such as management services) to meet requirements such as safety audits, maintenance and measurement logs, and real-time driving data.
  • the demand for real-time recording of businesses such as the cloud.
  • the embodiment of the present invention provides a method and device for providing a time source for automatic driving, which can provide a stable and reliable global time source reference for the automatic driving system, ensure the safe operation of the automatic driving system, and can meet the system's standard time demand.
  • an embodiment of the present invention provides an apparatus for providing a time source for automatic driving, which is applied to an automatic driving system of a vehicle, and includes: a first processor, and a first crystal oscillator connected to the first processor ⁇ ; Among them,
  • the first processor is configured to provide a first time source to the first subsystem of the automatic driving system through the first crystal oscillator, and to provide the first time source of the automatic driving system according to the received satellite time signal
  • the second sub-system provides a second time source; the first sub-system is used to process data related to the driving business of the vehicle; the second sub-system is used to process management related data of the vehicle.
  • independent time sources are provided to different subsystems (including the first subsystem and the second subsystem); among them, the first time source is used to provide information to the first subsystem (for example, related to automatic driving decision-making, control, Perception-related driving business subsystem) provides a time source as the master clock of the first subsystem; the second time source is used to provide the second subsystem (such as safety audits, maintenance and measurement log records, and cloud-related driving data).
  • the management subsystem provides a time source as the master clock of the second subsystem.
  • the above two sets of independent clock sources operate in corresponding clock systems respectively, and provide reference time for other nodes in the respective clock systems.
  • the first time source obtains the start time, even if it can receive the GNSS signal, it does not rely on the GNSS signal, but only passes through the first crystal oscillator (hereinafter referred to as the first crystal oscillator, for example, the onboard
  • the high-precision temperature-compensated crystal oscillator maintains the accuracy of the time in the system; the second time source tracks the GNSS clock provided by the satellite when the vehicle can receive the satellite time signal (ie, the GNSS signal).
  • the embodiment of the present invention realizes the functions of mutual isolation, independent operation, and non-influence between time sources; thereby ensuring the clock (or time source) that the first subsystem depends on.
  • the first processor is further configured to:
  • the second time source is provided to the second subsystem through the first crystal oscillator.
  • the second time source is provided to the corresponding clock system through the first crystal oscillator; therefore, the vehicle cannot receive the satellite signal GNSS, receives the wrong satellite signal, or receives the wrong satellite signal.
  • the time source that the first subsystem relies on is still reliable, avoiding the problem of time instability in the subsystem due to signal reasons.
  • the device further includes a signal receiving module connected to the first processor; the signal receiving module is configured to: when the satellite time signal is received, according to the The satellite time signal provides a reference frequency to the second time source; the first processor is specifically configured to: generate the second time source according to the reference frequency, and provide the second time source to the second subsystem Time source.
  • satellite signals satellite signals (satellite signals may include satellite time signals) are received through the signal receiving module; and the GNSS time of the satellite is obtained according to the time information contained in the received satellite time signal, ensuring that the satellite time signal is available ,
  • the time of each distributed subsystem of the automatic driving system can be adjusted according to the world standard time to prevent the time error caused by the offset of the crystal oscillator.
  • the device further includes: a first clock module connected to the first processor; the first clock module is configured to, according to a preset adjustment period, be based on the second
  • the time source is synchronized with a third time source
  • the third time source is a time source provided by the first clock module.
  • the second time source ie GNSS clock
  • the third time source ie RTC clock
  • the time difference between the autopilot system and UTC time is small, effectively preventing the infinite drift of the time of the first time source.
  • the first processor is further configured to:
  • the frequency ratios of the three groups of time sources include the first frequency ratio of the first time source and the second time source, and the first time source and the second time source.
  • the frequency ratio difference of each group of time sources in the three groups of time sources is determined, wherein the The frequency ratio differences of the three sets of time sources include the first frequency ratio difference between the first frequency ratio and the historical first frequency ratio, the second frequency ratio difference between the second frequency ratio and the historical second frequency ratio, And a third frequency ratio difference between the third frequency ratio and the historical third frequency ratio;
  • the first frequency ratio difference value, the second frequency ratio difference value, and the third frequency ratio difference value determine the crystal corresponding to the target time source in the first time source, the second time source, or the third time source
  • the oscillator frequency deviates from the preset frequency range.
  • the frequency ratio changes of three sets of clocks are periodically collected at a fixed cycle through a preset algorithm to realize Monitor the operating status of the onboard crystal oscillator; by judging whether the crystal oscillator of one of the three clocks has failed, to monitor whether the three time sources are reliable.
  • the first processor is specifically configured to:
  • OS_CLK Frequency is the clock frequency of the first time source
  • GNSS_CLK Frequency is the second time source Clock frequency
  • RTC_CLK Frequency is the clock frequency of the third time source.
  • the clock frequency of the first time source, the clock frequency of the second time source, and the clock frequency of the third time source are determined first, and then the first time source, the second time source, The three sets of frequency ratios of the three third time sources; it is convenient to determine the deviation of the three time sources and the historical frequency ratio according to the frequency ratio and the latest historical frequency ratio, so as to find the failure time source with excessive deviation.
  • the first processor is specifically configured to:
  • ⁇ FR1 abs(FR1-FR1 AVG )
  • ⁇ FR2 abs(FR2-FR2 AVG )
  • the first processor is further configured to:
  • the preset measurement period determine the k-th first frequency ratio, the k-th second frequency ratio, and the k-th third frequency ratio, until the N first frequency ratios, N second frequency ratios and N are determined
  • the third frequency ratio 0 ⁇ k ⁇ N, k is an integer
  • the historical frequency ratio corresponding to each of the three sets of frequency ratios is determined, wherein the three The historical frequency ratio corresponding to each group in the group frequency ratio includes the first historical frequency ratio corresponding to the first frequency ratio, the second historical frequency ratio corresponding to the second frequency ratio, and the second historical frequency ratio corresponding to the third frequency ratio.
  • the third historical frequency ratio is calculated based on a plurality of three groups of frequency ratios collected in history, which is subsequently used as a comparison with the current frequency ratio.
  • the first processor is specifically configured to:
  • fr1 1 , fr1 2 , fr1 3 ,..., fr1 N are respectively the first First frequency ratio, second first frequency ratio, third first frequency ratio,..., Nth first frequency ratio; fr2 1 , fr2 2 , fr2 3 ,..., fr2 N are the first The second frequency ratio, the second second frequency ratio, the third second frequency ratio,..., the Nth second frequency ratio; fr3 1 , fr3 2 , fr3 3 ,..., fr3 N are the first Three frequency ratio, the second third frequency ratio, the third third frequency ratio,..., the Nth third frequency ratio.
  • the multiple historical frequency ratios corresponding to each group of frequency ratios are first accumulated by the above formula, and then the sum of the accumulated historical frequency ratios is divided by the number of samples to obtain an accurate historical frequency ratio corresponding to each group. Determine whether the frequency ratios of the current three groups of time sources are normal based on the historical frequency ratios in order to discover abnormal time sources that deviate from the range.
  • the device further includes: a second processor connected to the first processor, where the second processor is a backup processor of the first processor;
  • the second processor is also connected to a second crystal oscillator and a second clock module respectively;
  • the second crystal oscillator is a backup crystal oscillator of the first crystal oscillator;
  • the second clock module is The backup module of the first clock module.
  • a backup system on a chip including a backup processor (that is, the second processor), a temperature-compensated crystal oscillator (that is, a second crystal oscillator), and an RTC clock chip (that is, a second clock module), etc.) are set up ,
  • a backup processor that is, the second processor
  • a temperature-compensated crystal oscillator that is, a second crystal oscillator
  • an RTC clock chip that is, a second clock module
  • the first sub-system is used to process data related to the driving business of the vehicle; the second sub-system is used to process management related data of the vehicle.
  • the data related to the driving business of the vehicle includes various sensors, central computing nodes, MCU control nodes, power management nodes, safety monitoring nodes, and other processed or related data.
  • the management-related data includes real-time data such as security audits, digital certificate validity check, and real-time upload of driving data to the cloud.
  • the first subsystem is specifically used to execute the driving business logic of the core algorithms of the automatic driving system such as autonomous driving perception, fusion and path planning, as well as the generation and issuance of vehicle control commands;
  • the second subsystem is specifically used to configure data for the automatic driving business Issue, and monitor and record the relevant business logic of the autonomous driving business operation status, such as equipment management, log records, on-board black boxes, and safety audits.
  • the first crystal oscillator is a temperature compensated crystal oscillator.
  • the on-board high-precision temperature-compensated crystal oscillator is used to provide the target time source (such as the first time source) with a precise oscillation frequency as the input pulse of the clock signal.
  • an embodiment of the present invention provides a method for providing a time source for automatic driving, which is applied to an automatic driving system of a vehicle, and the method includes:
  • the first sub-system is used to process data related to the driving business of the vehicle; the second sub-system is used to process related data of the vehicle management.
  • the method further includes:
  • the second time source is provided to the second subsystem through the first crystal oscillator.
  • the providing a second time source to the second subsystem of the automatic driving system according to the received satellite time signal includes:
  • the second time source is provided to the second subsystem.
  • the method further includes:
  • a third time source is synchronized based on the second time source, and the third time source is a time source provided by the first clock module.
  • the method further includes:
  • the frequency ratios of the three groups of time sources include the first frequency ratio of the first time source and the second time source, and the first time source and the second time source.
  • the frequency ratio difference of each group of time sources in the three groups of time sources is determined, wherein the The frequency ratio differences of the three sets of time sources include the first frequency ratio difference between the first frequency ratio and the historical first frequency ratio, the second frequency ratio difference between the second frequency ratio and the historical second frequency ratio, And a third frequency ratio difference between the third frequency ratio and the historical third frequency ratio;
  • the first frequency ratio difference, the second frequency ratio difference, and the third frequency ratio difference determine which of the first time source, the second time source, or the third time source corresponds to the target time source
  • the crystal oscillator frequency deviates from the preset frequency range.
  • the determining the frequency ratio of the three sets of time sources includes:
  • OS_CLK Frequency is the clock frequency of the first time source
  • GNSS_CLK Frequency is the second time source Clock frequency
  • RTC_CLK Frequency is the clock frequency of the third time source.
  • the frequency ratio difference of the three groups of time sources is determined according to the frequency ratio of the three groups of time sources and the historical frequency ratio corresponding to each of the three groups of frequency ratios ,include:
  • ⁇ FR1 abs(FR1-FR1 AVG )
  • ⁇ FR2 abs(FR2-FR2 AVG )
  • the method further includes:
  • the preset measurement period determine the k-th first frequency ratio, the k-th second frequency ratio, and the k-th third frequency ratio, until the N first frequency ratios, N second frequency ratios and N are determined
  • the third frequency ratio 0 ⁇ k ⁇ N, k is an integer
  • the historical frequency ratio corresponding to each of the three sets of frequency ratios is determined, wherein the three The historical frequency ratio corresponding to each group in the group frequency ratio includes the first historical frequency ratio corresponding to the first frequency ratio, the second historical frequency ratio corresponding to the second frequency ratio, and the second historical frequency ratio corresponding to the third frequency ratio.
  • the third historical frequency ratio includes the first historical frequency ratio corresponding to the first frequency ratio, the second historical frequency ratio corresponding to the second frequency ratio, and the second historical frequency ratio corresponding to the third frequency ratio.
  • the determining each of the three sets of frequency ratios is based on the N first frequency ratios, the N second frequency ratios, and the N third frequency ratios
  • the corresponding historical frequency ratio includes:
  • fr1 1 , fr1 2 , fr1 3 ,..., fr1 N are respectively the first First frequency ratio, second first frequency ratio, third first frequency ratio,..., Nth first frequency ratio; fr2 1 , fr2 2 , fr2 3 ,..., fr2 N are the first The second frequency ratio, the second second frequency ratio, the third second frequency ratio,..., the Nth second frequency ratio; fr3 1 , fr3 2 , fr3 3 ,..., fr3 N are the first Three frequency ratio, the second third frequency ratio, the third third frequency ratio,..., the Nth third frequency ratio.
  • the first crystal oscillator is a temperature compensated crystal oscillator.
  • an embodiment of the present invention provides another device for providing a time source for automatic driving, including:
  • the first time source unit is configured to provide a first time source to the first subsystem of the automatic driving system through a first crystal oscillator, and to provide a second time source to the second subsystem of the automatic driving system according to the received satellite time signal
  • the subsystem provides a second time source.
  • the device further includes a second time source unit, configured to:
  • the second time source is provided to the second subsystem through the first crystal oscillator.
  • the first time source unit is specifically used for:
  • the second time source is provided to the second subsystem.
  • the device further includes an adjustment unit, configured to:
  • a third time source is synchronized based on the second time source, and the third time source is a time source provided by the first clock module.
  • the device further includes:
  • the calculation unit is used to determine the frequency ratios of the three groups of time sources, wherein the frequency ratios of the three groups of time sources include the first frequency ratio of the first time source and the second time source, and the first time A second frequency ratio of the source to the third time source, and a third frequency ratio of the second time source to the third time source;
  • the comparing unit is configured to determine the frequency ratio difference of each of the three groups of time sources according to the frequency ratio of the three groups of time sources and the historical frequency ratio corresponding to each of the three groups of time sources , wherein the frequency ratio difference of the three groups of time sources includes the first frequency ratio difference between the first frequency ratio and the historical first frequency ratio, and the second frequency ratio between the second frequency ratio and the historical second frequency ratio. A frequency ratio difference, and a third frequency ratio difference between the third frequency ratio and the historical third frequency ratio;
  • the determining unit is configured to determine the target in the first time source, the second time source, or the third time source according to the first frequency ratio difference value, the second frequency ratio difference value, and the third frequency ratio difference value
  • the frequency of the crystal oscillator corresponding to the time source deviates from the preset frequency range.
  • the calculation unit is specifically configured to:
  • OS_CLK Frequency is the clock frequency of the first time source
  • GNSS_CLK Frequency is the second time source Clock frequency
  • RTC_CLK Frequency is the clock frequency of the third time source.
  • the comparison unit is specifically configured to:
  • ⁇ FR1 abs(FR1-FR1 AVG )
  • ⁇ FR2 abs(FR2-FR2 AVG )
  • the device further includes:
  • the measuring unit is configured to determine the k-th first frequency ratio, the k-th second frequency ratio, and the k-th third frequency ratio according to the preset measurement period, until N first frequency ratios and N second frequency ratios are determined.
  • Frequency ratio and N third frequency ratio 0 ⁇ k ⁇ N, k is an integer;
  • the historical frequency ratio unit is configured to determine the historical frequency corresponding to each of the three groups of frequency ratios according to the N first frequency ratios, the N second frequency ratios, and the N third frequency ratios
  • the historical frequency ratio corresponding to each of the three sets of frequency ratios includes a first historical frequency ratio corresponding to the first frequency ratio, a second historical frequency ratio corresponding to the second frequency ratio, and
  • the third frequency ratio corresponds to the third historical frequency ratio.
  • the historical frequency ratio unit is specifically used for:
  • fr1 1 , fr1 2 , fr1 3 , ..., fr1 N are respectively the first First frequency ratio, second first frequency ratio, third first frequency ratio,..., Nth first frequency ratio; fr2 1 , fr2 2 , fr2 3 ,..., fr2 N are the first The second frequency ratio, the second second frequency ratio, the third second frequency ratio,..., the Nth second frequency ratio; fr3 1 , fr3 2 , fr3 3 ,..., fr3 N are the first Three frequency ratio, the second third frequency ratio, the third third frequency ratio,..., the Nth third frequency ratio.
  • the first crystal oscillator is a temperature compensated crystal oscillator.
  • the present application provides a device for providing a time source for automatic driving, and the device for providing a time source has the function of implementing any of the above-mentioned methods for providing a time source.
  • This function can be realized by hardware, or by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above-mentioned functions.
  • the present application provides a terminal including a processor, and the processor is configured to support the terminal to perform a corresponding function in the method for providing a time source provided in the second aspect.
  • the terminal may also include a memory, which is used for coupling with the processor and stores necessary program instructions and data for the terminal.
  • the terminal may also include a communication interface for the terminal to communicate with other devices or communication networks.
  • the present application provides a chip system, which can execute any method involved in the above second aspect, so that related functions can be realized.
  • the chip system further includes a memory, and the memory is used to store necessary program instructions and data.
  • the chip system can be composed of chips, or include chips and other discrete devices.
  • the present application provides a vehicle equipped with the device for providing a time source and the corresponding automatic driving system as described in the first aspect, and can be used to execute any method involved in the second aspect, Makes relevant functions possible.
  • FIG. 1 is a schematic diagram of the architecture of an autonomous driving vehicle provided by an embodiment of the present invention
  • FIG. 2 is a schematic diagram of an automatic driving hardware architecture provided by an embodiment of the present invention.
  • Figure 3 is a hardware logic architecture diagram provided by an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a hardware structure principle provided by an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of the principle of providing a time source for automatic driving according to an embodiment of the present invention
  • FIG. 6 is another schematic diagram of the principle of providing a time source for automatic driving according to an embodiment of the present invention.
  • FIG. 7 is a schematic flowchart of a method for providing a time source for automatic driving according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of time source generation according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of another time source generation provided by an embodiment of the present invention.
  • FIG. 10 is a schematic diagram of a startup time setting provided by an embodiment of the present invention.
  • FIG. 11 is a schematic diagram of a connection between a primary and a standby SOC according to an embodiment of the present invention.
  • FIG. 12 is a schematic diagram of a time source adjustment process provided by an embodiment of the present invention.
  • FIG. 13 is a schematic structural diagram of a device for providing a time source for automatic driving according to an embodiment of the present invention.
  • FIG. 14 is a schematic structural diagram of a chip provided by an embodiment of the present invention.
  • Fig. 15 is a schematic diagram of a vehicle provided by an embodiment of the present invention.
  • component used in this specification are used to denote computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution.
  • the component may be, but is not limited to, a process, a processor, an object, an executable file, an execution thread, a program, and/or a computer running on a processor.
  • the application running on the computing device and the computing device can be components.
  • One or more components may reside in processes and/or threads of execution, and components may be located on one computer and/or distributed among two or more computers.
  • Crystal oscillator refers to a crystal element that adds an integrated circuit inside the package to form an oscillator circuit. It should be noted that all the crystal oscillators mentioned in this application refer to the above-mentioned crystal oscillators. Crystal oscillators include non-temperature-compensated crystal oscillators, temperature-compensated X'tal (crystal) Oscillator (TCXO), voltage-controlled crystal oscillators, and oven-controlled crystal oscillators.
  • a temperature-compensated crystal oscillator (hereinafter referred to as a temperature-compensated crystal oscillator) is a type of quartz crystal oscillator that reduces the amount of oscillation frequency change caused by changes in ambient temperature through an additional temperature compensation circuit.
  • Coordinated Universal Time also known as Universal Time, Universal Standard Time, and International Coordinated Time. Since English and French abbreviations are different, they can be referred to as UTC.
  • the UTC or CUT mentioned in this application refers to the aforementioned Coordinated Universal Time.
  • Coordinated Universal Time is a time measurement system based on the second of atomic time, which is as close as possible to universal time in time.
  • Real-Time Clock is an integrated circuit, usually called a clock chip or a real-time clock chip, which provides an accurate time reference for an electronic system.
  • a clock chip or a real-time clock chip, which provides an accurate time reference for an electronic system.
  • most real-time clock chips use high-precision crystal oscillators as clock sources. Some clock chips need to be powered by an external battery in order to work even when the main power supply is off.
  • SoC System-on-a-chip
  • the so-called complete system generally includes a processor, memory, and peripheral circuits.
  • SoC is developed in parallel with other technologies, such as silicon-on-insulator, which can provide enhanced clock frequencies, thereby reducing the power consumption of microchips.
  • Multi-core CPU integrates multiple CPU cores into a single chip, and each CPU core is a separate processor. Each CPU core can have its own separate cache, or multiple CPU cores can share the same Cache.
  • Serial Peripheral Interface is a high-speed, full-duplex, and synchronous communication bus, and it occupies only four lines on the pins of the chip, saving the pins of the chip At the same time, it saves space and provides convenience for the layout of the printed circuit board.
  • IIC Inter-Integrated Circuit
  • IIC Inter-Integrated Circuit
  • IIC is a serial data bus with only two signal lines, one is a bidirectional data line, the other is a clock line, two lines can hang multiple Devices. There is a fixed address in the IIC device (most of them), and it will respond only when the value transmitted on the two lines is equal to the fixed address of the IIC device.
  • IIC equipment is divided into master equipment and slave equipment.
  • Controller Area Network is an internationally standardized serial communication protocol specified by the International Organization for Standardization.
  • the distributed control system based on CAN bus has obvious advantages in the following aspects: the real-time data communication between the nodes of the network is strong; the development cycle is short; the international standard field bus has been formed and so on.
  • LAN switches are devices used for data exchange in switched LANs.
  • the switch device After the switch device is adopted, as long as the source node and the destination node of the sending data do not conflict, the data transmission is completely parallel, which improves the data transmission rate.
  • the Generalized Generalized Time Precision Protocol (10) is defined by IEEE 802.1AS on the basis of the precise time protocol, adding some new features to improve time accuracy and lock time.
  • PPS Pulse Per Second
  • the GPS pulse signal PPS per second is one per second, and its function is to indicate the time of the whole second, and the time is usually It is marked with the rising edge of the PPS second pulse.
  • GPS can give UTC time, and there will be a delay when the user receives it; in order to accurately time service, the rising edge of the PPS signal is introduced to mark the full-second time of UTC. The accuracy is very high and can reach the nanosecond level, and there is no cumulative error.
  • Time-Sensitive Networking also known as time-sensitive network
  • TSN Time-Sensitive Networking
  • Application Programming Interface is some pre-defined functions, or refers to the agreement between different components of the software system. Provide applications and developers with the ability to access a set of routines based on certain software or hardware without having to access the original code or understand the details of the internal working mechanism. Kernel mode and user mode are two operating levels of the operating system. Kernel mode has high authority and user mode has low authority. Therefore, the authority of kernel mode interface is high and the authority of user mode interface is low.
  • CMOS EPROM Compact Disc
  • EEPROM Electrically erasable programmable Logic Device
  • FIG. 1 is a schematic diagram of the architecture of an autonomous vehicle provided by an embodiment of the present invention.
  • the method and device for providing a time source proposed in this application can be applied to the architecture.
  • the architecture of the vehicle 100 may include a computer system 110 (including a processor 111 and a memory 112), a traveling system 120, a sensing system 130, a control system 140, peripheral equipment 150, a user interface 170, and a power supply 160, etc.;
  • the various components shown are only exemplary descriptions, and the actual architecture may include but is limited to the above components.
  • the method and device for providing a time source can be applied to the processor 111 in this architecture.
  • the memory 112 may store related programs or codes for executing the method of providing a time source.
  • the vehicle 100 may include more or fewer subsystems, and each subsystem may include multiple elements.
  • each subsystem and element of the vehicle 100 may be interconnected by wire or wirelessly.
  • the traveling system 102 may include components that provide power movement for the vehicle 100.
  • the travel system 102 may include an engine, an energy source, a transmission, and wheels/tires.
  • the engine may be an internal combustion engine, an electric motor, an air compression engine, or other types of engine combinations, such as a hybrid engine composed of a gas oil engine and an electric motor, or a hybrid engine composed of an internal combustion engine and an air compression engine.
  • the engine converts the energy source into mechanical energy.
  • Energy sources may include gasoline, diesel, other petroleum-based fuels, propane, other compressed gas-based fuels, ethanol, solar panels, batteries, and other sources of electricity.
  • the energy source may also provide energy for other systems of the vehicle 100.
  • the transmission device can transmit the mechanical power from the engine to the wheels.
  • the transmission device may include a gearbox, a differential, and a drive shaft.
  • the transmission device may also include other devices, such as a clutch.
  • the drive shaft may include one or more shafts that can be coupled to one or more wheels.
  • the sensing system 130 may include several sensors that sense information about the environment around the vehicle 100.
  • the sensing system 130 may include a positioning system (the positioning system may be a GPS system, a Beidou system or other positioning systems), an inertial measurement unit (IMU), radar, a laser rangefinder, and a camera.
  • the sensing system 130 may also include sensors of the internal system of the monitored vehicle 100 (for example, an in-vehicle air quality monitor, a fuel gauge, an oil temperature gauge, etc.). Sensor data from one or more of these sensors can be used to detect objects and their corresponding characteristics (position, shape, direction, speed, etc.). Such detection and identification are key functions for the safe operation of the autonomous vehicle 100.
  • the positioning system can be used to estimate the geographic location of the vehicle 100.
  • the IMU is used to sense changes in the position and orientation of the vehicle 100 based on inertial acceleration.
  • the IMU may be a combination of accelerometer and gyroscope.
  • the radar may use radio signals to sense objects in the surrounding environment of the vehicle 100.
  • the radar in addition to sensing the object, the radar can also be used to sense the speed and/or direction of the object.
  • the laser rangefinder can use laser light to sense objects in the environment where the vehicle 100 is located.
  • the laser rangefinder may include one or more laser sources, laser scanners, and one or more detectors, as well as other system components.
  • the camera may be used to capture multiple images of the surrounding environment of the vehicle 100.
  • the camera can be a still camera or a video camera.
  • the control system 140 controls the operation of the vehicle 100 and its components.
  • the control system 140 may include various components, including a steering system, a throttle, a braking unit, a computer vision system, a route control system, and an obstacle avoidance system.
  • the steering system is operable to adjust the forward direction of the vehicle 100.
  • the accelerator is used to control the operating speed of the engine and thus the speed of the vehicle 100.
  • the brake unit is used to control the vehicle 100 to decelerate.
  • the braking unit can use friction to slow the wheels. In other embodiments, the braking unit can convert the kinetic energy of the wheels into electric current.
  • the braking unit may also take other forms to slow down the rotation speed of the wheels so as to control the speed of the vehicle 100.
  • the computer vision system may be operable to process and analyze the images captured by the camera in order to identify objects and/or features in the surrounding environment of the vehicle 100.
  • the objects and/or features may include traffic signals, road boundaries, and obstacles.
  • Computer vision systems can use object recognition algorithms, Structure from Motion (SFM) algorithms, video tracking, and other computer vision technologies.
  • SFM Structure from Motion
  • a computer vision system can be used to map the environment, track objects, estimate the speed of objects, and so on.
  • the route control system is used to determine the travel route of the vehicle 100.
  • the route control system may combine data from sensors, GPS, and one or more predetermined maps to determine a route for the vehicle 100 to travel.
  • the obstacle avoidance system is used to identify, evaluate and avoid or otherwise cross over potential obstacles in the environment of the vehicle 100.
  • the control system 140 may add or alternatively include components other than those shown and described. Alternatively, a part of the components shown above may be reduced.
  • the vehicle 100 interacts with external sensors, other vehicles, other computer systems, or users through peripheral devices 150.
  • the peripheral device 150 may include a wireless communication system, an onboard computer, a microphone, and/or a speaker.
  • the peripheral device 150 provides a means for the user of the vehicle 100 to interact with the user interface 170.
  • the on-board computer can provide information to the user of the vehicle 100.
  • the user interface 170 can also operate the on-board computer to receive user input.
  • the on-board computer can be operated via the touch screen.
  • the peripheral device 150 may provide a means for the vehicle 100 to communicate with other devices located in the vehicle.
  • the microphone may receive audio (eg, voice commands or other audio input) from a user of the vehicle 100.
  • a wireless communication system can wirelessly communicate with one or more devices directly or via a communication network.
  • the wireless communication system may use 3G cellular communication, such as CDMA, EVDO, GSM/GPRS, or 4G cellular communication, such as LTE. Or 5G cellular communication.
  • the wireless communication system 146 may use WiFi to communicate with a wireless local area network (WLAN).
  • WLAN wireless local area network
  • the wireless communication system can directly communicate with the device using an infrared link, Bluetooth, or ZigBee.
  • Other wireless protocols such as various vehicle communication systems.
  • a wireless communication system may include one or more dedicated short-range communications (DSRC) devices. These devices may include communication between vehicles and/or roadside stations. Public and/or private data communication.
  • DSRC dedicated short-range communications
  • the power supply 160 may provide power to various components of the vehicle 100.
  • the power source 160 may be a rechargeable lithium ion or lead-acid battery.
  • One or more battery packs of such batteries may be configured as a power source to provide power to various components of the vehicle 100.
  • the power source 160 and the energy source may be implemented together, such as in some all-electric vehicles.
  • the user interface 170 is used to provide information to or receive information from a user of the vehicle 100.
  • the user interface 170 may include one or more input/output devices in the set of peripheral devices 150, such as a wireless communication system, an in-vehicle computer, a microphone, and a speaker.
  • the computer system 110 may include at least one processor 111 that executes instructions stored in a non-transitory computer readable medium such as a data storage device.
  • the computer system 110 may also be multiple computing devices that control individual components or subsystems of the vehicle 100 in a distributed manner.
  • the processor 111 may be any conventional processor, such as a commercially available CPU. Alternatively, the processor may be a dedicated device such as an ASIC or other hardware-based processor. Those of ordinary skill in the art should understand that the processor, computer, or memory may actually include multiple processors, computers, or memories that may or may not be stored in the same physical housing.
  • the memory may be a hard disk drive or other storage medium located in a housing other than the computer. Therefore, a reference to a processor or computer will be understood to include a reference to a collection of processors or computers or memories that may or may not operate in parallel. Rather than using a single processor to perform the steps described here, some components such as steering components and deceleration components may each have its own processor that only performs calculations related to component-specific functions .
  • the processor may be located away from the vehicle and wirelessly communicate with the vehicle.
  • some of the processes described herein are executed on a processor arranged in the vehicle and others are executed by a remote processor, including taking the necessary steps to perform a single manipulation.
  • the computer system 110 may control the functions of the vehicle 100 based on inputs received from various subsystems (for example, the traveling system 120, the sensing system 130, and the control system 140) and from the user interface 170.
  • the computer system 110 may utilize input from the control system 140 in order to control the steering unit to avoid obstacles detected by the sensing system 130 and the obstacle avoidance system.
  • the computer system 112 is operable to provide control of many aspects of the vehicle 100 and its subsystems.
  • one or more of these components described above may be installed or associated with the vehicle 100 separately.
  • the foregoing component is only an example.
  • the components in each of the foregoing modules may be added or deleted according to actual needs, and should not be construed as a limitation to the embodiment of the present invention.
  • the above-mentioned vehicle 100 may be a car, truck, motorcycle, bus, boat, airplane, helicopter, lawn mower, recreational vehicle, playground vehicle, construction equipment, tram, golf cart, train, and trolley, etc.
  • the embodiments of the invention are not particularly limited.
  • the computer system 110 may include multiple processors, and different processors process data of different services; for example, processor A is used to provide a time source, processor B is a backup processor of processor A, and processor C Used to calculate data related to autonomous driving business.
  • processor A is used to provide a time source
  • processor B is a backup processor of processor A
  • processor C Used to calculate data related to autonomous driving business.
  • the computer system may include a processor, and the processor is divided into multiple sub-processing modules according to functions, and different sub-modules are used to process data of different services.
  • sub-module A is used to provide a time source
  • sub-module B is used to process data related to driving logs and vehicle safety performance.
  • the vehicle 100 may include one or more computer systems, for example, the computer system A is the main computer system, and the computer system B is the backup system of the main computer system.
  • the computer system may be an SOC, that is, a chip with integrated functions.
  • FIG. 1 is only an exemplary application architecture in the embodiment of the present invention, and the application architecture in the embodiment of the present invention includes but is not limited to the above application architecture.
  • the following embodiment of the present invention deploys two chips on the circuit board of the vehicle (that is, each chip runs a computer system, one is the main computer system (hereinafter referred to as the main system), and the other is the backup computer system (hereinafter referred to as the backup system)) ,
  • the composition of the main and standby chips is described as an example.
  • both chips may be SOC, and the two chips may be connected by a bus.
  • the main computer system 110 and the backup computer system 110' the main computer system 110 and the backup computer system 110'.
  • FIG. 2 is a schematic diagram of an autonomous driving hardware architecture provided by an embodiment of the present invention; as shown in Figure 2, each chip integrates multiple cores (ie multiple processors), for example, in Figure 2
  • the processor 301 in the primary system is used to run the operating system (ie, Master OS) running on the primary computer system;
  • the processor 301' in the standby system is used to run the operating system running on the standby computer system (Ie, Backup OS);
  • the processor 303, the processor 304, the processor 303', and the processor 304' are all exemplary descriptions, and specific functions are not limited.
  • the processor 302 and the processing 302' are used to run the same AOOS.
  • the operating system refers to the operating system on a subsystem that is always powered on in the automatic driving system. It is started in the Master OS and Backup OS of the main and backup systems. When the time, the system is responsible for obtaining the time from the onboard RTC real-time clock and setting this time as the startup time of the Master OS and Backup OS.
  • the backup system can replace the primary system to operate.
  • the backup system can also perform the same calculation services as the main system to verify the calculation results of the main system.
  • FIG. 3 is a hardware logic architecture diagram provided by an embodiment of the present invention; as shown in FIG. 3, the main chip (take SOC as an example, the following backup chip is also described by SOC as an example) 110 Including processor 111 and memory 112, processor 111 may include processor 301 (ie processor 1), processor 302 (ie processor 2), processor 303 (ie processor 3), and processor 304 (ie processor 4);
  • the processor 301 is used to run the Master OS, and the processor 2 is used to run the AO OS.
  • the processor 303 is used to calculate business data related to automatic driving;
  • the business data related to automatic driving includes processing or related data such as various sensors, central computing nodes, MCU control nodes, power management nodes, and safety monitoring nodes.
  • the aforementioned business data involves the execution of the driving business logic of the core algorithms of the automatic driving system such as autonomous driving perception, fusion and path planning, as well as the generation and issuance of vehicle control commands;
  • the processor 304 is used to calculate management data related to the cloud of audit, log, and driving data.
  • the relevant management data includes real-time data such as security audits, digital certificate validity period inspections, and real-time uploading of driving data to the cloud.
  • the aforementioned management data relates to the distribution process of automatic driving business configuration data, as well as related business logic for monitoring and recording the operating status of the automatic driving business, such as equipment management, log records, on-board black boxes, and safety audits.
  • the main SOC may also include other one or more processors, memories, and other functional components or modules, such as graphics processing unit (GPU), random access memory (Random Access Memory, RAM), encoders, etc. Wait.
  • the main SOC is connected to the signal receiving module (such as the GNSS module), the end node 307 ( Figure 3 exemplarily lists the end node 1, the end node 2, ..., the end node Q, Q is an integer greater than 0; the main SOC Provide a time reference to multiple end nodes.
  • the embodiment of the present invention does not limit the specific connection mode; wherein, the end node may be an end node (End Point, EP) that needs time synchronization, such as vehicle-mounted lidar, millimeter wave radar, etc.
  • End Point End Point
  • a first crystal oscillator 305 (the first crystal oscillator may be a high-precision temperature-compensated crystal oscillator), and a clock module (such as an RTC real-time clock chip).
  • the active SOC can also be connected to the standby SOC to perform communication and interaction between chips.
  • the backup processor (ie, the backup SOC) can run at the same time when the primary processor (ie, the primary SOC) is working normally, and is used to process the same services as the primary SOC; for example, the second SOC of the backup SOC A time source tracks the first time source of the main SOC, and compares the backup time-related calculation results with the main time-related calculations to verify the time accuracy of the first time source in the main SOC.
  • the main processor fails, stop tracking the first time source of the main SOC.
  • the backup SOC110' is connected to the temperature-compensated crystal oscillator (ie the second crystal oscillator), the RTC clock chip (ie the second clock module), and is connected to the signal receiving module 308; at the same time, the backup SOC is also connected to one or more end nodes , But when the main SOC is operating normally, no time reference is provided to each end node EP.
  • the related hardware structure of the main SOC and the method of providing time source for automatic driving involved in the embodiment of the present invention the related principles and methods of the backup SOC can refer to the main SOC , I will not repeat the backup SOC and the connection between it and the main SOC.
  • FIG. 4 is a schematic diagram of a hardware structure provided by an embodiment of the present invention
  • the first crystal oscillator is a temperature-compensated crystal oscillator
  • the first clock module is an RTC clock chip (Ie real-time clock chip)
  • the satellite signal receiving module may be a GNSS module
  • the end node EP takes a sensor as an example
  • the hardware structure of the main SOC includes a processor 301, a processor 302, processor 303, processor 304, memory 112, bus bridge 401, system bus 402, I/O interface 403, network interface 404, etc.
  • the main SOC also communicates with the GNSS module through the I (dedicated CAN bus) shown in the figure 308 connection, used to receive GNSS signals; connected to the RTC clock chip 306 through the illustrated II (such as SPI or IIC bus), used to obtain the real real-time time; connected to the sensor 406 through
  • I dedicated CAN bus
  • the end node 307 provides a time reference; by connecting with the temperature-compensated crystal oscillator 305 on the circuit board, the oscillation frequency of the temperature-compensated crystal oscillator is obtained to maintain the operation of the system time.
  • the main SOC can also connect to the network through a network interface to obtain required information or real-time data.
  • FIG. 5 is a schematic diagram of the principle of providing a time source for automatic driving according to an embodiment of the present invention.
  • the embodiment of the present invention uses the processor 301 and the processor 302 ( Running AOOS), the processor 303 and the processor 304, as well as the GNSS module (that is, the signal receiving module) 308, the temperature-compensated crystal oscillator 305, and the onboard RTC (that is, the onboard real-time clock chip) 306 are described as examples.
  • the processor 301 and the processor 302 Running AOOS
  • the processor 303 and the processor 304 as well as the GNSS module (that is, the signal receiving module) 308, the temperature-compensated crystal oscillator 305, and the onboard RTC (that is, the onboard real-time clock chip) 306 are described as examples.
  • the GNSS module that is, the signal receiving module
  • the onboard RTC that is, the onboard real-time clock chip
  • Two sets of clocks are deployed in the processor 301 of the main SOC, namely the first time source OS-CLK and the second time source GNSS-CLK.
  • OS-CLK relies on the temperature-compensated crystal oscillator 305 to operate regardless of whether the vehicle can receive the GNSS signal;
  • GNSS-CLK tracks the GNSS time provided by the satellite according to the GNSS signal when the vehicle can obtain the GNSS signal;
  • the GNSS signal cannot be obtained, through the message feedback of the GNSS module (the GNSS module is connected with the C interface (ie CAN interface, the following C interface is used to represent the CAN interface, and the subsequent description will not be explained)), switch to relying on temperature-compensated crystal for maintenance The normal operation of time in the system.
  • the C interface ie CAN interface, the following C interface is used to represent the CAN interface, and the subsequent description will not be explained
  • the on-board RTC When the system starts or wakes up from sleep, the on-board RTC provides the start-up time to the main SOC and the backup SOC.
  • the start-up time is used to set the OS-CLK and GNSS-CLK in the two SOCs.
  • the processor 301 sends a time synchronization message (Anounce/Sync packet) to the LAN switch through the network port M (for example, the network port M is a Ten-Gigabit Ethernet (XGE)). ; Then the LAN switch is used as the boundary clock to send the above-mentioned time synchronization message to multiple end nodes to ensure the time synchronization of each time node.
  • XGE Ten-Gigabit Ethernet
  • the processor 301 may also provide the processor 303 with an OS-CLK time synchronization message and provide the processor 304 with a GNSS-CLK time synchronization message. It is understandable that the time stability principle and structure of the standby SOC are basically the same as those of the main SOC, and will not be repeated here.
  • the OS-CLK of Backup OS in the backup SOC is also used to track the OS-CLK of the Master OS in the main SOC; please refer to Figure 6, which is another example of providing time for automatic driving according to an embodiment of the present invention Schematic diagram of the source.
  • the processor 302 and the processor 302' both run the same AOOS.
  • the GNSS-CLK of the standby SOC has the same working principle as the GNSS-CLK in the main SOC, and the main SOC and the standby SOC are connected to the same signal receiving module (ie, the GNSS module 308).
  • the main and standby SOCs are connected to different temperature-compensated crystal oscillators, but since the OS-CLK of the standby SOC is based on the time of the OS-CLK of the main SOC (ie the main chip), the standby SOC (ie the backup chip) is in the main In the case of normal operation of the SOC, it can be used as the secondary master clock of the OS-CLK of the main SOC to provide a time reference to other end nodes, which is equivalent to expanding the network port or port of the main OS-CLK connection node.
  • Lan Switch 1 (LSW1) shown in FIG. 6 receives both the time synchronization message from the primary SOC and the time synchronization message from the standby SOC.
  • LSW1 can select the time synchronization message sent by the active SOC as the standard; each LSW is connected to the corresponding network port of the active and standby SOC at the same time.
  • Lan Switch0/Lan Switch1 is the internal switching node, which also runs the gPTP protocol stack and acts as an 802.1AS boundary clock. One of the ports receives and processes gPTP packets sent by a Master port of the master plane.
  • an EndPoint sensor As an EndPoint sensor, it receives and processes Anounce and Sync message messages by running the gPTP protocol stack software, and calculates and adjusts the deviation between the local clock and the GMC clock and the path transmission delay based on the timestamp information carried in these messages, and Adjust the time of the local clock to maintain synchronization with the GMC time.
  • the time deviation of all destination nodes and the GMC time is controlled within a set range, for example, within 10 us.
  • FIG. 6 is an extension of the content shown in FIG. 5, and the corresponding content such as the processor 303, the processor 304, and the processor 302 that are not involved in FIG. 6 will not be repeated here.
  • FIG. 7 A schematic flowchart of a method for providing a time source for automatic driving; as shown in FIG. 7, the method uses the processor 301 (ie, the first processor) as the execution body, and may include step S701-step S702.
  • Step S701 Provide a first time source to the first subsystem of the autopilot system through the first crystal oscillator, and provide a second time source to the second subsystem of the autopilot system according to the received satellite time signal .
  • the first subsystem is used to process data related to the driving business of the vehicle; the second subsystem is used to process management related data of the vehicle.
  • Figure 8 is a schematic diagram of time source generation provided by an embodiment of the present invention; as shown in Figure 8, after the system is started and the GNSS module can receive GNSS signals (that is, satellite time signals), in order to ensure automatic driving
  • the first time source ie OS-CLK
  • OS-CLK completely relies on the on-board temperature-compensated crystal oscillator (for example, the accuracy is 10ppm) to run; the hardware clock inside the M network port is also adjusted to the same time as the OS-CLK.
  • OS-CLK becomes the master clock of the entire network.
  • the GNSS signal is available, provide the reference frequency for the second time source (ie GNSS-CLK) based on the GNSS signal, and adjust the GNSS-CLK to ensure that it is synchronized with the GNSS time source (ie the GNSS time of the satellite).
  • the error of GNSS time source is controlled within 10us.
  • OS-CLK is dedicated to the autonomous driving computing business (that is, the business of the first subsystem).
  • GNSS-CLK is used for business related to vehicle management (ie, the business of the second subsystem).
  • the business plane in the vehicle is basically a driving plane and a management plane.
  • the driving plane is used to process vehicle driving calculation-related data
  • the management plane is used to process related data such as auditing, log recording, and driving data management.
  • Both the driving plane and the management plane can be considered to contain or correspond to one or more subsystems, such as travel systems, sensor systems, and control systems.
  • the GNSS signal (including the time position) is directly connected to the system through the CAN bus and the PPS clock signal line; and both the active and standby SOCs can receive the GNSS signal.
  • Access to the GNSS signal in this way ensures that the GNSS-CLK of the main SOC and the backup GNSS-CLK can effectively receive the GNSS signal, ensuring the consistency of signal transmission, and further ensuring the stability of the subsequent time source.
  • the providing a second time source to the second subsystem of the automatic driving system according to the received satellite time signal includes: using the satellite time signal as the second The reference frequency of the time source generates the second time source, and the satellite time signal is received through a signal receiving module; and the second time source is provided to the second subsystem.
  • Step S702 Provide the second time source to the second subsystem through the first crystal oscillator when the satellite time signal is not received.
  • Figure 9 is a schematic diagram of another time source generation provided by an embodiment of the present invention.
  • the GNSS module when the GNSS module cannot track satellites (that is, cannot receive GNSS signals), the GNSS module It also outputs time, but this time may drift slowly; after receiving feedback from the GNSS module, GNSS-CLK generally does not continue to track the output time of the GNSS module, but instead relies on the first crystal oscillator to maintain the system time Normal time service.
  • OS-CLK that is, the first time source
  • the UTC time service is provided. The clock tracks the GNSS time and provides UCT time for management plane transactions.
  • GNSS-CLK can select a network port hardware clock that does not need to participate in time synchronization or use pure software to implement a set. This clock is after the vehicle is cold-started or awakened from sleep, but also after the initial startup time provided by AO OS .
  • GNSS is available, track the GNSS time source.
  • GNSS is not available, use its own crystal oscillator to keep time. To meet the requirements of the management plane business for UTC time. Of course, the problem of time jump may also occur when tracking GNSS, but it does not affect the safety of automatic driving, and the impact on the time accuracy of the management plane data is negligible.
  • the GNSS-CLK clock needs to encapsulate API interfaces in user mode and kernel mode for modules that require accurate UTC time.
  • the user-mode API interface is provided for users to operate and adjust the time information for users in the management subsystem under normal circumstances; while the kernel-mode API interface is provided for manual adjustment of the system time when necessary And operation has a great impact on the system as a whole, generally you need to obtain the corresponding authority to operate the time through the interface.
  • operations such as time synchronization are considered to be operations performed at the kernel level.
  • For users to obtain the time in the management subsystem (for example, the date of the maintenance log), they only rely on the user-mode interface. The time at the bottom of the system cannot be obtained, but only the processed time information. The time at the bottom of the system can be obtained through the kernel mode interface.
  • a start time is obtained from a first clock module, where the start time is the start time of the first time source and the second time source.
  • a startup time is set as the startup time of the Master OS (ie, the processor 301); specifically, the startup time is set as the startup time of OS-CLK and GNSS-CLK. For example, when the system starts or wakes up from sleep, AO OS obtains the startup time from the onboard RTC real-time clock to set the startup time of the OS-CLK and GNSS-CLK of the main plane.
  • FIG. 11 is a schematic diagram of the connection between the main and standby SOCs according to an embodiment of the present invention; as shown in 2 in FIG.
  • the main SOC is connected to the temperature-compensated crystal oscillator 305, which is provided to the OS-CLK Baseline oscillation frequency; OS-CLK is used as the master clock in the corresponding clock system, to the processor 303 (used to process autonomous driving related services), multiple M network ports (used to send time synchronization messages to the end node, and to the standby SOC110' provides a time reference).
  • OS-CLK is used as the master clock in the corresponding clock system
  • the processor 303 used to process autonomous driving related services
  • multiple M network ports used to send time synchronization messages to the end node, and to the standby SOC110' provides a time reference.
  • the main SOC and the backup SOC are connected to different temperature-compensated crystal oscillators, but this error can be corrected by the way the M network port is connected to the S network port.
  • the standby SOC relies on different temperature-compensated crystal oscillators, when the main SOC is operating normally, the OS-CLK that tracks the main SOC is still used as the time reference.
  • the master port clock refers to a clock role specified by the gPTP protocol. Only the port clock in the master state can send time synchronization messages to the outside, which has higher clock accuracy.
  • Slave port clock refers to a clock role specified by the gPTP protocol. The port clock in the Slave state is not allowed to send time synchronization messages. It can only receive and process synchronization messages sent by the upper-level Master clock, and the clock needs to be adjusted to maintain synchronization with the Master clock. .
  • the master and backup SOC constitute a pair of Master port clock and Slave port clock. It is understandable that the master SOC and other boundary clocks, or the next-level nodes also constitute a pair of Master port clock and Slave port clock respectively.
  • the method further includes: synchronizing a third time source based on the second time source according to a preset adjustment period, the third time source being provided by the first clock module Time source.
  • Fig. 12 is a schematic diagram of a time source adjustment process provided by an embodiment of the present invention; as shown in 1-4 of Fig. 12, first, in the adjustment period, the current GNSS time fed back by the GNSS module is received through the GNSS interface ; GNSS-CLK tracks GNSS signals; AOOS synchronizes the time of RTC with the GNSS time of GNSS-CLK.
  • AO OS provides the initial startup time after the vehicle is cold-started or awakened from sleep. After that, it completely relies on its own crystal oscillator to maintain the operation of the OS clock and no longer track the GNSS time source; Other nodes on the board use the gPTP protocol to track this OS-CLK to achieve the goal of clock synchronization across the entire network. In this case, due to the drift of its own crystal oscillator, the OS-CLK will gradually deviate, and the clocks of other nodes will also follow the deviation. Therefore, in the process of automatic driving, use GNSS-CLK to periodically adjust the RTC clock to keep the RTC clock synchronized with the GNSS clock. Using this method, you can ensure that the time of the automatic driving system is different from UTC time every time the vehicle is started. It is not too big, which can effectively prevent the infinite drift of OS-CLK time.
  • three sets of clocks with independent crystal oscillators are deployed on the single board: OS-CLK, GNSS-CLK, and RTC-CLK.
  • OS-CLK mainly relies on the self-oscillation operation of the on-board temperature-compensated crystal oscillator, in order to prevent the temperature-compensated crystal oscillator from being abnormal or failing, it is necessary to perform health monitoring on the operating status of the temperature-compensated crystal oscillator.
  • design a timing (for example, 50ms) monitoring program to prevent the time of the root clock from jumping due to the abnormality of the crystal itself and affecting the safety of automatic driving. Therefore, the monitoring algorithm provided by the embodiment of the present invention is used to monitor and adjust the OS-CLK.
  • the frequency ratios of the three groups of time sources include the first frequency ratio of the first time source and the second time source, and the first time source and the second time source.
  • the frequency ratio difference of each group of time sources in the three groups of time sources is determined, wherein the The frequency ratio differences of the three sets of time sources include the first frequency ratio difference between the first frequency ratio and the historical first frequency ratio, the second frequency ratio difference between the second frequency ratio and the historical second frequency ratio, And a third frequency ratio difference between the third frequency ratio and the historical third frequency ratio;
  • the first frequency ratio difference, the second frequency ratio difference, and the third frequency ratio difference determine which of the first time source, the second time source, or the third time source corresponds to the target time source
  • the crystal oscillator frequency deviates from the preset frequency range.
  • the determining the frequency ratio of the three sets of time sources includes:
  • OS_CLK Frequency is the clock frequency of the first time source
  • GNSS_CLK Frequency is the second time source Clock frequency
  • RTC_CLK Frequency is the clock frequency of the third time source.
  • the frequency of each physical clock actually jitters, so the frequency ratio of the two clocks also jitters.
  • the time stamp sequence of two clocks can be measured continuously at regular intervals. The size of this sequence is fixed. For example, the time stamp sequence of each clock stores 7 to 10 time stamps; this The timestamp sequence can be implemented using a queue. After the queue becomes full, each time a new timestamp enters the queue, the oldest timestamp at the tail of the queue will be eliminated. Then the difference ratio after subtracting the first and last timestamps of the timestamp sequence using the two clocks is:
  • TN can be the seventh time stamp
  • T0 can be the first time stamp. The difference is the time between the first time stamp and the seventh time stamp.
  • the frequency ratio difference of the three groups of time sources is determined according to the frequency ratio of the three groups of time sources and the historical frequency ratio corresponding to each of the three groups of frequency ratios ,include:
  • ⁇ FR1 abs(FR1-FR1 AVG )
  • ⁇ FR2 abs(FR2-FR2 AVG )
  • the currently latest measured frequency ratio of the two CLKs can be marked as FR_Curr (that is, FR1 in the above formula), and ⁇ FR is defined as the difference between the current frequency ratio and the historical average frequency ratio.
  • FR_Curr that is, FR1 in the above formula
  • ⁇ FR is defined as the difference between the current frequency ratio and the historical average frequency ratio.
  • ⁇ FR is a change within a reasonable range that can be expected, and the concept that the frequency of the three sets of clocks jumps or fails at the same time can be infinitely small, so it can be inferred: if a certain ⁇ FR suddenly becomes larger than By setting the threshold value, it can be inferred that one of the two clocks is suspected of failure.
  • a clock abnormality alarm needs to be reported to the upper management plane.
  • the following provides a historical frequency mean value calculation method, which also includes:
  • the preset measurement period determine the k-th first frequency ratio, the k-th second frequency ratio, and the k-th third frequency ratio, until the N first frequency ratios, N second frequency ratios and N are determined
  • the third frequency ratio 0 ⁇ k ⁇ N, k is an integer
  • the historical frequency ratio corresponding to each of the three sets of frequency ratios is determined, wherein the three The historical frequency ratio corresponding to each group in the group frequency ratio includes the first historical frequency ratio corresponding to the first frequency ratio, the second historical frequency ratio corresponding to the second frequency ratio, and the second historical frequency ratio corresponding to the third frequency ratio.
  • the third historical frequency ratio includes the first historical frequency ratio corresponding to the first frequency ratio, the second historical frequency ratio corresponding to the second frequency ratio, and the second historical frequency ratio corresponding to the third frequency ratio.
  • the determining each of the three sets of frequency ratios is based on the N first frequency ratios, the N second frequency ratios, and the N third frequency ratios
  • the corresponding historical frequency ratio includes:
  • fr1 1 , fr1 2 , fr1 3 ,..., fr1 N are respectively the first First frequency ratio, second first frequency ratio, third first frequency ratio,..., Nth first frequency ratio; fr2 1 , fr2 2 , fr2 3 ,..., fr2 N are the first The second frequency ratio, the second second frequency ratio, the third second frequency ratio,..., the Nth second frequency ratio; fr3 1 , fr3 2 , fr3 3 ,..., fr3 N are the first Three frequency ratio, the second third frequency ratio, the third third frequency ratio,..., the Nth third frequency ratio.
  • N can represent the latest frequency ratio sample number, and the value can be between 7 and 10.
  • the software needs to collect and process a large amount of data, and also relies on the scheduling strategy of the OS, which may cause the detection result to be not timely enough.
  • FIG. 13 is a schematic structural diagram of an apparatus for providing a time source for automatic driving according to an embodiment of the present invention
  • the apparatus 131 for providing a time source for automatic driving includes a first time source unit 131 and a second time source unit 131.
  • the first time source unit 131 is configured to provide a first time source to the first subsystem of the automatic driving system through a first crystal oscillator, and to provide a second time source to the second subsystem of the automatic driving system according to the received satellite time signal.
  • the system provides a second time source.
  • the device further includes a second time source unit 132, configured to:
  • the second time source is provided to the second subsystem through the first crystal oscillator.
  • the first time source unit 131 is specifically configured to:
  • the second time source is provided to the second subsystem.
  • the device further includes an adjustment unit 133, configured to:
  • a third time source is synchronized based on the second time source, and the third time source is a time source provided by the first clock module.
  • the device further includes:
  • the calculation unit 134 is configured to determine the frequency ratios of the three groups of time sources, where the frequency ratios of the three groups of time sources include the first frequency ratio of the first time source to the second time source, and the first frequency ratio of the first time source to the second time source.
  • the comparing unit 135 is configured to determine the frequency ratio difference of each of the three groups of time sources according to the frequency ratio of the three groups of time sources and the historical frequency ratio corresponding to each of the three groups of time sources
  • the difference between the frequency ratios of the three groups of time sources includes the first frequency ratio difference between the first frequency ratio and the historical first frequency ratio, and the second frequency ratio and the historical second frequency ratio.
  • the determining unit 136 is configured to determine the first time source, the second time source, or the third time source according to the first frequency ratio difference value, the second frequency ratio difference value, and the third frequency ratio difference value
  • the frequency of the crystal oscillator corresponding to the target time source deviates from the preset frequency range.
  • the calculation unit 134 is specifically configured to:
  • OS_CLK Frequency is the clock frequency of the first time source
  • GNSS_CLK Frequency is the second time source Clock frequency
  • RTC_CLK Frequency is the clock frequency of the third time source.
  • the comparing unit 135 is specifically configured to:
  • ⁇ FR1 abs(FR1-FR1 AVG )
  • ⁇ FR2 abs(FR2-FR2 AVG )
  • the device further includes:
  • the measuring unit 137 is configured to determine the k-th first frequency ratio, the k-th second frequency ratio, and the k-th third frequency ratio according to the preset measurement period, until the N first frequency ratios and the Nth frequency ratio are determined. Two frequency ratios and N third frequency ratios; 0 ⁇ k ⁇ N, k is an integer;
  • the historical frequency ratio unit 138 is configured to determine the history corresponding to each of the three groups of frequency ratios according to the N first frequency ratios, the N second frequency ratios, and the N third frequency ratios Frequency ratio, wherein the historical frequency ratio corresponding to each of the three groups of frequency ratios includes a first historical frequency ratio corresponding to the first frequency ratio, a second historical frequency ratio corresponding to the second frequency ratio, The third frequency ratio corresponds to the third historical frequency ratio.
  • the historical frequency ratio unit 138 is specifically configured to:
  • fr1 1 , fr1 2 , fr1 3 ,..., fr1 N are respectively the first First frequency ratio, second first frequency ratio, third first frequency ratio,..., Nth first frequency ratio; fr2 1 , fr2 2 , fr2 3 ,..., fr2 N are the first The second frequency ratio, the second second frequency ratio, the third second frequency ratio,..., the Nth second frequency ratio; fr3 1 , fr3 2 , fr3 3 ,..., fr3 N are the first Three frequency ratio, the second third frequency ratio, the third third frequency ratio,..., the Nth third frequency ratio.
  • the first crystal oscillator is a temperature compensated crystal oscillator.
  • the device for providing a time source for automatic driving described in the embodiment of the present invention can refer to the related description of the method for providing a time source for automatic driving in the method embodiment described in FIG. 7. Go into details again.
  • FIG. 14 is a schematic structural diagram of a chip provided by an embodiment of the present invention.
  • An apparatus 13 for providing a time source for automatic driving can be implemented in the structure shown in FIG. 14.
  • the device 14 includes at least one processor 141 and at least one memory 142.
  • the device may also include general components such as antennas, which will not be described in detail here.
  • the processor 141 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the above program programs.
  • CPU central processing unit
  • ASIC application-specific integrated circuit
  • the memory 142 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types that can store information and instructions
  • the dynamic storage device can also be electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), CD-ROM (Compact Disc Read-Only Memory, CD-ROM) or other optical disc storage, optical disc storage (Including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures and can be used by a computer Any other media accessed, but not limited to this.
  • the memory can exist independently and is connected to the processor through a bus.
  • the memory can also be integrated with the processor.
  • the memory 142 is used to store application program codes for executing the above solutions, and the processor 141 controls the execution.
  • the processor 141 is configured to execute application program codes stored in the memory 142.
  • the code stored in the memory 142 can execute the method of providing a time source for automatic driving provided in FIG. 7 above, for example, when a satellite time signal is received, A first time source is provided to the first subsystem of the autopilot system through a first crystal oscillator, and a second time source is provided to the second subsystem of the autopilot system according to the received satellite time signal.
  • FIG. 15 is a schematic diagram of a vehicle provided by an embodiment of the present invention.
  • the vehicle 15 includes an on-board computer 151,
  • the vehicle 15 can receive the satellite time signal sent by the satellite 16.
  • the vehicle-mounted computer can execute part or all of the steps of any one of the method embodiments corresponding to FIGS. 7-12. For example, when a satellite time signal is received, a first time source that depends on the operation of the first crystal oscillator and a second time source that depends on the operation of the satellite signal are provided; when the satellite time signal is not received, the second time source that still depends on the operation of the first crystal is provided. A time source and switch to a second time source that depends on the operation of the first crystal oscillator.
  • the vehicle may also include a backup on-board computer to prevent a single point of failure of the automatic driving system and improve the overall reliability of the system.
  • the disclosed device may be implemented in other ways.
  • the device embodiments described above are only illustrative, for example, the division of the above-mentioned units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or integrated. To another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical or other forms.
  • the units described above as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the 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 may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the technical solution of this application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium.
  • a computer device which may be a personal computer, a server, or a network device, etc., specifically a processor in a computer device
  • the aforementioned storage media may include: U disk, mobile hard disk, magnetic disk, optical disk, read-only memory (Read-Only Memory, abbreviation: ROM) or Random Access Memory (Random Access Memory, abbreviation: RAM), etc.

Abstract

本发明实施例公开了一种为自动驾驶提供时间源的方法及装置,可以应用于人工智能领域的车辆自动驾驶。所述方法包括通过第一晶体振荡器向所述自动驾驶系统的第一子系统提供第一时间源,以及根据接收到的卫星时间信号向所述自动驾驶系统的第二子系统提供第二时间源。通过实施本发明实施例,能够为自动驾驶系统提供稳定可靠的全局时间源基准,确保自动驾驶系统的安全运行,并且能够满足系统对世界标准时间的需求。

Description

一种为自动驾驶提供时间源的方法及装置 技术领域
本申请涉及时间同步技术领域,尤其涉及一种为自动驾驶提供时间源的方法及装置。
背景技术
人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。自动驾驶是人工智能领域的一种主流应用,自动驾驶技术依靠计算机视觉、雷达、监控装置和全球定位系统等协同合作,让机动车辆可以在不需要人类主动操作下,实现自动驾驶。自动驾驶的车辆使用各种计算系统来帮助将乘客从一个位置运输到另一位置。一些自动驾驶车辆可能要求来自操作者(诸如,领航员、驾驶员、或者乘客)的一些初始输入或者连续输入。自动驾驶车辆准许操作者从手动操作模式切换到自动驾驶模式或者介于两者之间的模式。由于自动驾驶技术无需人类来驾驶机动车辆,所以理论上能够有效避免人类的驾驶失误,减少交通事故的发生,且能够提高公路的运输效率。因此,自动驾驶技术越来越受到重视。
在自动驾驶系统中,存在数量众多的与自动驾驶相关的异构计算节点,例如各种传感器、中心计算节点、微控制单元(Microcontroller Unit,MCU)控制节点、电源管理节点及安全监控节点等。而保持这些节点之间的高精度时间同步,是自动驾驶的感知、定位和融合规控等算法安全可靠工作的基础性必要条件。此外,除了保证与自动驾驶相关节点的时间同步外,还需要为自动驾驶系统涉及的其他业务(如管理业务)提供准确的世界标准时间服务,以满足诸如安全审计、维测日志、行车数据实时上云等业务对真实时间记录的需求。
在现有技术中,为达成自动驾驶系统中高精度时间同步目标,根据所使用的通信总线和协议类型不同,有多种成熟的时间同步协议和标准。无论基于何种协议或标准实现时间同步,都需要稳定可靠的全局统一的时间源,为自动驾驶系统中各子节点提供时间同步基准。在当前的自动驾驶系统中,一般通过跟踪全球导航卫星系统(Global Navigation Satellite System,GNSS)时间信号作为整个系统的主时钟(即全局根时钟),为其他节点提供时间基准。当GNSS信号可用时,调整本地时钟以保持与GNSS时间源同步。当GNSS信号不可用时,完全依赖晶振的自由震荡维持系统时间的运行。在追踪GNSS信号过程中,可能会出现GNSS信号无法接收、被屏蔽、GNSS信号接收错误等情况;并且由于GNSS信号不稳定,造成在车辆行驶过程中经常发生时间跳变,影响自动驾驶算法的安全可靠性,给自动驾驶的安全性带来严重的潜在安全隐患,甚至导致严重交通事故。
因此,如何为自动驾驶系统提供稳定可靠的全局时间源基准,确保自动驾驶系统的安全运行,并且能够满足系统对世界标准时间的需求,是亟待解决的问题。
发明内容
本发明实施例提供了一种为自动驾驶提供时间源的方法及装置,能够为自动驾驶系统提供稳定可靠的全局时间源基准,确保自动驾驶系统的安全运行,并且能够满足系统对世界标准时间的需求。
第一方面,本发明实施例提供了一种为自动驾驶提供时间源的装置,应用于车辆的自动驾驶系统,包括:第一处理器、以及与所述第一处理器连接的第一晶体振荡器;其中,
所述第一处理器,用于通过所述第一晶体振荡器向所述自动驾驶系统的第一子系统提供第一时间源,以及根据接收到的卫星时间信号向所述自动驾驶系统的第二子系统提供第二时间源;所述第一子系统用于处理所述车辆的行驶业务相关数据;所述第二子系统用于处理所述车辆的管理相关数据。
本发明实施例,向不同的子系统(包括第一子系统和第二子系统)提供独立的时间源;其中,第一时间源用于向第一子系统(例如与自动驾驶决策、控制、感知相关的驾驶业务子系统)提供时间源,作为该第一子系统的主时钟;第二时间源用于向第二子系统(例如与安全审计、维测日志记录和行车数据上云相关的管理子系统)提供时间源,作为该第二子系统的主时钟。上述两套独立的时钟源,分别在对应的时钟系统运作,为各自时钟系统中的其他节点提供基准时间。具体地,第一时间源从获取启动时间之后,即使能够接收到GNSS信号的情况下,也不依赖于GNSS信号,而只通过第一晶体振荡器(以下简称第一晶振,例如,板载的高精度温度补偿晶体振荡器)维持系统中时间的准确性;第二时间源在车辆能够接收到卫星时间信号(即GNSS信号)的情况下,跟踪卫星提供的GNSS时钟。本发明实施例通过提供两个独立的时间源以及对应的时钟系统,实现了时间源之间相互隔离,独立运行,互不影响的功能;从而确保第一子系统依赖的时钟(或称时间源)在任何驾驶场景中不受外部影响,为内部算法及外部传感器等节点提供连续稳定的时间同步服务。解决了当前自动驾驶系统时间同步方案中时间源不可靠、不稳定、不安全的问题,避免了时间同步跟踪过程容易发生时间跳变的问题,同时满足安全审计、数字证书有效期检查和行车数据上云等的时间需求,保障自动驾驶车辆在何种场景中运行,都为自动驾驶系统提供稳定可靠的全局时间源基准和时间服务,确保自动驾驶系统的安全运行并且满足系统对世界标准时间的需求。
在一种可能的实现方式中,所述第一处理器,还用于:
在未接收到所述卫星时间信号的情况下,通过所述第一晶体振荡器向所述第二子系统提供所述第二时间源。本发明实施例中,在车辆无法接收卫星信号GNSS信号的情况下,通过第一晶振向对应时钟系统提供第二时间源;因此,在车辆无法接收卫星信号GNSS、接收错误卫星信号或者接收到不稳定卫星信号等情况下,第一子系统依赖的时间源仍然可靠,避免由于信号原因造成该子系统中时间不稳定的问题。
在一种可能的实现方式中,所述装置还包括与所述第一处理器连接的信号接收模块;所述信号接收模块,用于在接收到所述卫星时间信号的情况下,根据所述卫星时间信号向所述第二时间源提供基准频率;所述第一处理器,具体用于:根据所述基准频率生成所述第二时间源,向所述第二子系统提供所述第二时间源。本发明实施例中,通过信号接收模块接收卫星信号(卫星信号可以包括卫星时间信号);并根据接收的卫星时间信号包含的时 间信息,获得卫星的GNSS时间,保障在卫星时间信号可用的情况下,自动驾驶系统各个分布式子系统的时间能够根据世界标准时间进行调整,防止晶振偏移导致的时间误差。
在一种可能的实现方式中,所述装置还包括:与所述第一处理器连接的第一时钟模块;所述第一时钟模块,用于根据预设的调整周期,基于所述第二时间源同步第三时间源,所述第三时间源为所述第一时钟模块提供的时间源。本发明实施例,通过在车辆自动驾驶过程中,使用第二时间源(即GNSS时钟),定期调整第三时间源(即RTC时钟),以保持RTC时钟跟GNSS时钟同步,可以保证在车辆每次启动后,自动驾驶系统的时间与UTC时间相差较小,有效防止第一时间源的时间无限漂移。
在一种可能的实现方式中,所述第一处理器,还用于:
确定三组时间源的频率比,其中,所述三组时间源的频率比包括所述第一时间源与所述第二时间源的第一频率比、所述第一时间源与所述第三时间源的第二频率比、以及所述第二时间源与所述第三时间源的第三频率比;
根据所述三组时间源的频率比和所述三组时间源中每一个组对应的历史频率比,确定所述三组时间源中每一组时间源的频率比差值,其中,所述三组时间源的频率比差值包括所述第一频率比与历史第一频率比的第一频率比差值、所述第二频率比与历史第二频率比的第二频率比差值、以及所述第三频率比与历史第三频率比的第三频率比差值;
根据所述第一频率比差值、所述第二频率比差值和所述第三频率比差值,确定第一时间源、第二时间源或者第三时间源中目标时间源对应的晶体振荡器频率偏离预设频率范围。
本发明实施例,通过预设的算法,以固定的周期定时采集三组时钟(即三组时间源,包括第一时间源、第二时间源和第三时间源)的频率比变化情况,实现监测板载晶振的运行状态;通过判断这三个时钟中是否某个时钟的晶振失效,以监测三个时间源是否可靠。
在一种可能的实现方式中,所述第一处理器,具体用于:
通过公式
Figure PCTCN2019119754-appb-000001
Figure PCTCN2019119754-appb-000002
Figure PCTCN2019119754-appb-000003
确定所述第一频率比FR1、所述第二频率比FR2和所述第三频率比FR3;其中,OS_CLK Frequency为所述第一时间源的时钟频率;GNSS_CLK Frequency为所述第二时间源的时钟频率;RTC_CLK Frequency为所述第三时间源的时钟频率。
本发明实施例,先确定第一时间源的时钟频率、第二时间源的时钟频率和第三时间源的时钟频率,再根据上述公式确定所述第一时间源、所述第二时间源、所述第三时间源三者的三组频率比;便于根据频率比和最新的历史频率比,确定三个时间源与历史频率比的偏差,以发现偏差过大的失效时间源。
在一种可能的实现方式中,所述第一处理器,具体用于:
通过公式
ΔFR1=abs(FR1-FR1 AVG)
ΔFR2=abs(FR2-FR2 AVG)
ΔFR3=abs(FR3-FR3 AVG)
确定所述第一频率比差值ΔFR1、所述第二频率比差值ΔFR2和所述第三频率比差值ΔFR3;其中,abs(FR1-FR1 AVG)为所述第一频率比与所述历史第一频率比的差值的绝对值;abs(FR2-FR2 AVG)为所述第二频率比与所述历史第二频率比的差值的绝对数值;abs(FR3-FR3 AVG)为所述第三频率比与所述历史第三频率比的差值的绝对值。本发明实施例,在计算出三组频率比之后,根据频率比与对应的历史频率作差值,确定计算的当前频率比偏离历史平均值的程度。根据偏离程度和投票原理,确定偏离程度最明显的时间源为失效的时间源,有利于对时间源进行调整。
在一种可能的实现方式中,所述第一处理器,还用于:
根据预设的测量周期,确定第k个第一频率比、第k个第二频率比和第k个第三频率比,直至确定N个第一频率比、N个第二频率比和N个第三频率比;0<k≤N,k为整数;
根据所述N个第一频率比、所述N个第二频率比和所述N个第三频率比,确定所述三组频率比中每一个组对应的历史频率比,其中,所述三组频率比中每一个组对应的历史频率比,包括所述第一频率比对应的第一历史频率比、所述第二频率比对应的第二历史频率比、所述第三频率比对应的第三历史频率比。本发明实施例,根据历史采集的多个三组频率比,计算出每一组频率比对应的历史频率比,后续作为与当前频率比的对照。
在一种可能的实现方式中,所述第一处理器,具体用于:
通过公式
Figure PCTCN2019119754-appb-000004
Figure PCTCN2019119754-appb-000005
Figure PCTCN2019119754-appb-000006
确定所述第一历史频率比FR1 AVG、所述第二历史频率比FR2 AVG、所述第三历史频率比FR3 AVG;其中,fr1 1、fr1 2、fr1 3、…、fr1 N分别为第1个第一频率比、第2个第一频率比、第3个第一频率比、…、第N个第一频率比;fr2 1、fr2 2、fr2 3、…、fr2 N分别为第1个第二频率比、第2个第二频率比、第3个第二频率比、…、第N个第二频率比;fr3 1、fr3 2、fr3 3、…、fr3 N分别为第1个第三频率比、第2个第三频率比、第3个第三频率比、…、第N个第三频率比。本发明实施例中,通过上述公式先累加每一组频率比对应的多个历史频率比,再对累加的历史频率比之和除以样本数量,得到准确的每一组对应的历史频率比。基于历史历史频率比确定当前三组时间源的频率比是否正常,以发明偏离范围的异常时间源。
在一种可能的实现方式中,所述装置还包括:与所述第一处理器连接的第二处理器,其中,所述第二处理器为所述第一处理器的备份处理器;所述第二处理器还分别与第二晶体振荡器以及第二时钟模块连接;所述第二晶体振荡器,为所述第一晶体振荡器的备份晶体振荡器;所述第二时钟模块,为所述第一时钟模块的备份模块。本发明实施例中,通过 设置备份片上系统(包括备份的处理器(即第二处理器),温补晶振(即第二晶体振荡器)以及RTC时钟芯片(即第二时钟模块)等等),提供了一种双芯片系统容灾备份根时钟解决方案,即一般情况下备用处理器处于静默状态,当发生主备处理器倒换时备用处理器接替主用处理器为对应系统中其他节点提供时钟服务。
在一种可能的实现方式中,所述第一子系统用于处理所述车辆的行驶业务相关数据;所述第二子系统用于处理所述车辆的管理相关数据。本发明实施例中,所述车辆的行驶业务相关数据包括各种传感器、中心计算节点、MCU控制节点、电源管理节点及安全监控节点等处理或者涉及的数据。所述管理相关数据包括安全审计、数字证书有效期检查、行车数据实时上云等涉及真实时间的数据。其中,第一子系统具体用于执行自动驾驶感知、融合和路径规划,以及车辆控制命令生成和下发等自动驾驶系统核心算法的驾驶业务逻辑;第二子系统具体用于自动驾驶业务配置数据下发,以及监控和记录自动驾驶业务运行状态的相关业务逻辑,比如设备管理、日志记录、车载黑匣子以及安全审计等。
在一种可能的实现方式中,所述第一晶体振荡器为温度补偿晶体振荡器。本发明实施例,在未接收到卫星时间信号的情况下,通过板载的高精度温度补偿晶体振荡器,向目标时间源(如第一时间源)提供精确的振荡频率,作为时钟的输入脉冲信号。
第二方面,本发明实施例提供了一种为自动驾驶提供时间源的方法,应用于车辆的自动驾驶系统,所述方法包括:
通过第一晶体振荡器向所述自动驾驶系统的第一子系统提供第一时间源,以及根据接收到的卫星时间信号向所述自动驾驶系统的第二子系统提供第二时间源;所述第一子系统用于处理所述车辆的行驶业务相关数据;所述第二子系统用于处理所述车辆的管理相关数据。
在一种可能的实现方式中,所述方法还包括:
在未接收到所述卫星时间信号的情况下,通过所述第一晶体振荡器向所述第二子系统提供所述第二时间源。
在一种可能的实现方式中,所述根据接收到的所述卫星时间信号向所述自动驾驶系统的第二子系统提供第二时间源,包括:
将所述卫星时间信号作为所述第二时间源的基准频率,生成所述第二时间源,所述卫星时间信号为通过信号接收模块接收的;
向所述第二子系统提供所述第二时间源。
在一种可能的实现方式中,所述方法还包括:
根据预设的调整周期,基于所述第二时间源同步第三时间源,所述第三时间源为所述第一时钟模块提供的时间源。
在一种可能的实现方式中,所述方法还包括:
确定三组时间源的频率比,其中,所述三组时间源的频率比包括所述第一时间源与所述第二时间源的第一频率比、所述第一时间源与所述第三时间源的第二频率比、以及所述第二时间源与所述第三时间源的第三频率比;
根据所述三组时间源的频率比和所述三组时间源中每一个组对应的历史频率比,确定所述三组时间源中每一组时间源的频率比差值,其中,所述三组时间源的频率比差值包括所述第一频率比与历史第一频率比的第一频率比差值、所述第二频率比与历史第二频率比的第二频率比差值、以及所述第三频率比与历史第三频率比的第三频率比差值;
根据所述第一频率比差值、所述第二频率比差值和所述第三频率比差值,确定第一时间源、第二时间源或者第三时间源中目标时间源对应的的晶体振荡器频率偏离预设频率范围。
在一种可能的实现方式中,所述确定三组时间源的频率比,包括:
通过公式
Figure PCTCN2019119754-appb-000007
Figure PCTCN2019119754-appb-000008
Figure PCTCN2019119754-appb-000009
确定所述第一频率比FR1、所述第二频率比FR2和所述第三频率比FR3;其中,OS_CLK Frequency为所述第一时间源的时钟频率;GNSS_CLK Frequency为所述第二时间源的时钟频率;RTC_CLK Frequency为所述第三时间源的时钟频率。
在一种可能的实现方式中,所述根据所述三组时间源的频率比和所述三组频率比中每一个组对应的历史频率比,确定所述三组时间源的频率比差值,包括:
通过公式
ΔFR1=abs(FR1-FR1 AVG)
ΔFR2=abs(FR2-FR2 AVG)
ΔFR3=abs(FR3-FR3 AVG)
确定所述第一频率比差值ΔFR1、所述第二频率比差值ΔFR2和所述第三频率比差值ΔFR3;其中,abs(FR1-FR1 AVG)为所述第一频率比与所述历史第一频率比的差值的绝对值;abs(FR2-FR2 AVG)为所述第二频率比与所述历史第二频率比的差值的绝对值;abs(FR3-FR3 AVG)为所述第三频率比与所述历史第三频率比的差值的绝对值。
在一种可能的实现方式中,所述方法还包括:
根据预设的测量周期,确定第k个第一频率比、第k个第二频率比和第k个第三频率比,直至确定N个第一频率比、N个第二频率比和N个第三频率比;0<k≤N,k为整数;
根据所述N个第一频率比、所述N个第二频率比和所述N个第三频率比,确定所述三组频率比中每一个组对应的历史频率比,其中,所述三组频率比中每一个组对应的历史频率比,包括所述第一频率比对应的第一历史频率比、所述第二频率比对应的第二历史频率比、所述第三频率比对应的第三历史频率比。
在一种可能的实现方式中,所述根据所述N个第一频率比、所述N个第二频率比和所述N个第三频率比,确定所述三组频率比中每一个组对应的历史频率比,包括:
通过公式
Figure PCTCN2019119754-appb-000010
Figure PCTCN2019119754-appb-000011
Figure PCTCN2019119754-appb-000012
确定所述第一历史频率比FR1 AVG、所述第二历史频率比FR2 AVG、所述第三历史频率比FR3 AVG;其中,fr1 1、fr1 2、fr1 3、…、fr1 N分别为第1个第一频率比、第2个第一频率比、第3个第一频率比、…、第N个第一频率比;fr2 1、fr2 2、fr2 3、…、fr2 N分别为第1个第二频率比、第2个第二频率比、第3个第二频率比、…、第N个第二频率比;fr3 1、fr3 2、fr3 3、…、fr3 N分别为第1个第三频率比、第2个第三频率比、第3个第三频率比、…、第N个第三频率比。
在一种可能的实现方式中,所述第一晶体振荡器为温度补偿晶体振荡器。
第三方面,本发明实施例提供了另一种为自动驾驶提供时间源的装置,包括:
第一时间源单元,用于通过第一晶体振荡器向所述自动驾驶系统的第一子系统提供第一时间源,以及根据接收到的所述卫星时间信号向所述自动驾驶系统的第二子系统提供第二时间源。
在一种可能的实现方式中,所述装置还包括第二时间源单元,用于:
在未接收到所述卫星时间信号的情况下,通过第一晶体振荡器向所述第二子系统提供所述第二时间源。
在一种可能的实现方式中,所述第一时间源单元,具体用于:
将所述卫星时间信号作为所述第二时间源的基准频率,生成所述第二时间源,所述卫星时间信号为通过信号接收模块接收的;
向所述第二子系统提供所述第二时间源。
在一种可能的实现方式中,所述装置还包括调整单元,用于:
根据预设的调整周期,基于所述第二时间源同步第三时间源,所述第三时间源为所述第一时钟模块提供的时间源。
在一种可能的实现方式中,所述装置还包括:
计算单元,用于确定三组时间源的频率比,其中,所述三组时间源的频率比包括所述第一时间源与所述第二时间源的第一频率比、所述第一时间源与所述第三时间源的第二频率比、以及所述第二时间源与所述第三时间源的第三频率比;
比较单元,用于根据所述三组时间源的频率比和所述三组时间源中每一个组对应的历史频率比,确定所述三组时间源中每一组时间源的频率比差值,其中,所述三组时间源的频率比差值包括所述第一频率比与历史第一频率比的第一频率比差值、所述第二频率比与历史第二频率比的第二频率比差值、以及所述第三频率比与历史第三频率比的第三频率比差值;
确定单元,用于根据所述第一频率比差值、所述第二频率比差值和所述第三频率比差值,确定第一时间源、第二时间源或者第三时间源中目标时间源对应的的晶体振荡器频率偏离预设频率范围。
在一种可能的实现方式中,所述计算单元,具体用于:
通过公式
Figure PCTCN2019119754-appb-000013
Figure PCTCN2019119754-appb-000014
Figure PCTCN2019119754-appb-000015
确定所述第一频率比FR1、所述第二频率比FR2和所述第三频率比FR3;其中,OS_CLK Frequency为所述第一时间源的时钟频率;GNSS_CLK Frequency为所述第二时间源的时钟频率;RTC_CLK Frequency为所述第三时间源的时钟频率。
在一种可能的实现方式中,所述比较单元,具体用于:
通过公式
ΔFR1=abs(FR1-FR1 AVG)
ΔFR2=abs(FR2-FR2 AVG)
ΔFR3=abs(FR3-FR3 AVG)
确定所述第一频率比差值ΔFR1、所述第二频率比差值ΔFR2和所述第三频率比差值ΔFR3;其中,abs(FR1-FR1 AVG)为所述第一频率比与所述历史第一频率比的差值的绝对值;abs(FR2-FR2 AVG)为所述第二频率比与所述历史第二频率比的差值的绝对值;abs(FR3-FR3 AVG)为所述第三频率比与所述历史第三频率比的差值的绝对值。
在一种可能的实现方式中,所述装置还包括:
测量单元,用于根据预设的测量周期,确定第k个第一频率比、第k个第二频率比和第k个第三频率比,直至确定N个第一频率比、N个第二频率比和N个第三频率比;0<k≤N,k为整数;
历史频率比单元,用于根据所述N个第一频率比、所述N个第二频率比和所述N个第三频率比,确定所述三组频率比中每一个组对应的历史频率比,其中,所述三组频率比中每一个组对应的历史频率比,包括所述第一频率比对应的第一历史频率比、所述第二频率比对应的第二历史频率比、所述第三频率比对应的第三历史频率比。
在一种可能的实现方式中,所述历史频率比单元,具体用于:
通过公式
Figure PCTCN2019119754-appb-000016
Figure PCTCN2019119754-appb-000017
Figure PCTCN2019119754-appb-000018
确定所述第一历史频率比FR1 AVG、所述第二历史频率比FR2 AVG、所述第三历史频率比FR3 AVG;其中,fr1 1、fr1 2、fr1 3、…、fr1 N分别为第1个第一频率比、第2个第一频率比、第3个第一频率比、…、第N个第一频率比;fr2 1、fr2 2、fr2 3、…、fr2 N分别为第1个第二频率比、第2个第二频率比、第3个第二频率比、…、第N个第二频率比;fr3 1、fr3 2、fr3 3、…、fr3 N分别为第1个第三频率比、第2个第三频率比、第3个第三频率比、…、第N个第三频率比。
在一种可能的实现方式中,所述第一晶体振荡器为温度补偿晶体振荡器。
第四方面,本申请提供一种为自动驾驶提供时间源的装置,该提供时间源的装置具有实现上述任意一种提供时间源的方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
第五方面,本申请提供一种终端,该终端包括处理器,处理器被配置为支持该终端执行第二方面提供的一种提供时间源的方法中相应的功能。该终端还可以包括存储器,存储器用于与处理器耦合,其保存终端必要的程序指令和数据。该终端还可以包括通信接口,用于该终端与其它设备或通信网络通信。
第六方面,本申请提供了一种芯片系统,所述芯片系统可以执行如上述第二方面中涉及的任意方法,使得相关功能得以实现。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器,用于保存必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。
第七方面,本申请提供一种车辆,该车辆搭载了上述第一方面所述的提供时间源的装置以及相应的自动驾驶系统,并且可以用于执行如上述第二方面中涉及的任意方法,使得相关功能得以实现。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍。
图1是本发明实施例提供的一种自动驾驶车辆的架构示意图;
图2是本发明实施例提供的一种自动驾驶硬件架构示意图;
图3是本发明实施例提供的一种硬件逻辑架构图;
图4是本发明实施例提供的一种硬件结构原理示意图;
图5是本发明实施例提供的一种为自动驾驶提供时间源的原理示意图;
图6是本发明实施例提供的另一种为自动驾驶提供时间源的原理示意图;
图7是本发明实施例提供的一种为自动驾驶提供时间源的方法的流程示意图;
图8是本发明实施例提供的一种时间源生成示意图;
图9是本发明实施例提供的另一种时间源生成示意图;
图10是本发明实施例提供的一种启动时刻设置示意图;
图11是本发明实施例提供的一种主备用SOC连接示意图;
图12是本发明实施例提供的一种时间源调整流程示意图;
图13是本发明实施例提供的一种为自动驾驶提供时间源的装置的结构示意图;
图14是本发明实施例提供的一种芯片的结构示意图;
图15是本发明实施例提供的一种车辆示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例进行描述。
本申请的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
在本说明书中使用的术语“部件”、“模块”、“系统”等用于表示计算机相关的实体、硬件、固件、硬件和软件的组合、软件、或执行中的软件。例如,部件可以是但不限于,在处理器上运行的进程、处理器、对象、可执行文件、执行线程、程序和/或计算机。通过图示,在计算设备上运行的应用和计算设备都可以是部件。一个或多个部件可驻留在进程和/或执行线程中,部件可位于一个计算机上和/或分布在2个或更多个计算机之间。
首先,对本申请中的部分用语进行解释说明,以便于本领域技术人员理解。
(1)晶体振荡器,简称为晶振,是指在封装内部添加集成电路,组成振荡电路的晶体元件。需要说明的是,本申请中提及的晶振均指的是上述的晶体振荡器。晶体振荡器包括非温度补偿式晶体振荡器、温度补偿晶体振荡器(Temperature Compensate X'tal(crystal)Oscillator,TCXO)、电压控制晶体振荡器、恒温控制式晶体振荡器等几种类型。其中,温度补偿晶体振荡器(以下简称温补晶振)是通过附加的温度补偿电路使由周围温度变化产生的振荡频率变化量削减的一种石英晶体振荡器。
(2)协调世界时(Coordinated Universal Time,CUT),又称世界统一时间、世界标准时间、国际协调时间。由于英文和法文的缩写不同,又可以简称UTC。本申请中提及的UTC或者CUT指的是上述协调世界时。协调世界时是以原子时秒长为基础,在时刻上尽量接近于世界时的一种时间计量系统。
(3)实时时钟(Real_Time Clock,RTC),是一种集成电路,通常称为时钟芯片或者实时时钟芯片,为电子系统提供精确的时间基准。目前实时时钟芯片大多采用精度较高的晶体振荡器作为时钟源。有些时钟芯片为了在主电源掉电时,还可以工作,需要外加电池供电。
(4)片上系统(System-on-a-chip,SoC),指的是在单个芯片上集成一个完整的系统,对所有或部分必要的电子电路进行包分组的技术。所谓完整的系统一般包括处理器、存储器、以及外围电路等。SoC是与其它技术并行发展的,如绝缘硅,它可以提供增强的时钟频率,从而降低微芯片的功耗。
(5)多核CPU是将多个CPU核集成到单个芯片中,每个CPU核都是一个单独的处理器。每个CPU核可以有自己单独的缓存Cache,也可以多个CPU核共享同一Cache。
(6)串行外设接口(Serial Peripheral Interface,SPI),是一种高速的,全双工,同步的通信总线,并且在芯片的管脚上只占用四根线,节约了芯片的管脚,同时为印刷电路板的布局上节省空间,提供方便。
(7)集成电路总线(Inter-Integrated Circuit,IIC),是一种串行数据总线,只有二根信号线,一根是双向的数据线,另一根是时钟线,两条线可以挂多个设备。IIC设备(绝大多数)里有个固化的地址,只有在两条线上传输的值等于IIC设备的固化地址时,其才会作出响应。通常把IIC设备分为主设备和从设备。
(8)控制器局域网络(Controller Area Network,CAN),是国际标准化组织规定的国际标准化的串行通信协议。基于CAN总线的分布式控制系统在以下方面具有明显的优越性:网络各节点之间的数据通信实时性强;开发周期短;已形成国际标准的现场总线等等。
(9)局域网交换机(LAN switches),是用在交换式局域网内进行数据交换的设备。在交换式局域网中,采用交换机设备之后,只要发送数据的源节点和目的节点不冲突,那么数据发送就完全并行,提高了数据传送的速率。
(10)通用广义时间精度协议(gPTP),是IEEE 802.1AS定义了在精确时间协议的基础上,新增了一些特征features,提高时间精度与锁定时间。
(11)每秒脉冲数(Pulse Per Second,PPS),在全球卫星定位系统GPS中,GPS秒脉冲信号PPS一秒钟一个,其的作用是用来指示整秒的时刻,而该时刻通常是用PPS秒脉冲的上升沿来标示。GPS能给出UTC时间,用户收到时是会有延时;为了精确授时,引入PPS信号上升沿来标示UTC的整秒时刻,精度很高可以到纳秒级,并且没有累积误差。
(12)时效性网络(Time-Sensitive Networking,TSN),也称为时间敏感网络,是IEEE802.1工作小组中的TSN工作小组发展的系列标准。此标准会定义以太网上时间敏感传输的机制。
(13)应用程序接口(Application Programming Interface,API)是一些预先定义的函数,或指软件系统不同组成部分衔接的约定。提供应用程序与开发人员基于某软件或硬件得以访问一组例程的能力,而又无需访问原码,或理解内部工作机制的细节。内核态和用户态是操作系统的两种运行级别,内核态权限高,用户态权限低,因此内核态接口的权限高以及用户态接口的权限低。
(14)复杂可编程逻辑器件(Complex Programmable Logic Device,CPLD),采用CMOS EPROM、EEPROM、快闪存储器和SRAM等编程技术,从而构成了高密度、高速度和低功耗的可编程逻辑器件。
接下来先对本发明实施例所基于的其中一种应用架构进行描述。请参见图1,图1是本发明实施例提供的一种自动驾驶车辆的架构示意图,本申请提出的提供时间源的方法以及装置可以应用于该架构中。该车辆100的架构中可以包括计算机系统110(包括处理器111和存储器112)、行进系统120、传感系统130、控制系统140、外围设备150、用户接口170和电源160等等;图1所示的各个组成部分只是示例性的描述,实际架构可以包括但限于上述组成部分。其中,提供时间源的方法以及装置可以应用于该架构中处理器111。而存储器112可以存储执行提供时间源的方法的相关程序或者代码。可选地,车辆100可包括更多或更少的子系统,并且每个子系统可包括多个元件。另外,车辆100的每个子系统和元件可以通过有线或者无线互连。
其中,行进系统102可包括为车辆100提供动力运动的组件。在一个实施例中,行进系统102可包括引擎、能量源、传动装置和车轮/轮胎。引擎可以是内燃引擎、电动机、空气压缩引擎或其他类型的引擎组合,例如气油发动机和电动机组成的混动引擎,内燃引擎和空气压缩引擎组成的混动引擎。引擎将能量源转换成机械能量。能量源可以包括汽油、柴油、其他基于石油的燃料、丙烷、其他基于压缩气体的燃料、乙醇、太阳能电池板、电池和其他电力来源。能量源也可以为车辆100的其他系统提供能量。传动装置可以将来自引擎的机械动力传送到车轮。传动装置可包括变速箱、差速器和驱动轴。在一个实施例中,传动装置还可以包括其他器件,比如离合器。其中,驱动轴可包括可耦合到一个或多个车轮的一个或多个轴。
传感系统130可包括感测关于车辆100周边的环境的信息的若干个传感器。例如,传感系统130可包括定位系统(定位系统可以是GPS系统,也可以是北斗系统或者其他定位系统)、惯性测量单元(inertial measurement unit,IMU)、雷达、激光测距仪以及相机。传感系统130还可包括被监视车辆100的内部系统的传感器(例如,车内空气质量监测器、燃油量表、机油温度表等)。来自这些传感器中的一个或多个的传感器数据可用于检测对象及其相应特性(位置、形状、方向、速度等)。这种检测和识别是自主车辆100的安全操作的关键功能。定位系统可用于估计车辆100的地理位置。IMU用于基于惯性加速度来感测车辆100的位置和朝向变化。在一个实施例中,IMU可以是加速度计和陀螺仪的组合。雷达可利用无线电信号来感测车辆100的周边环境内的物体。在一些实施例中,除了感测物体以外,雷达还可用于感测物体的速度和/或前进方向。激光测距仪可利用激光来感测车辆100所位于的环境中的物体。在一些实施例中,激光测距仪可包括一个或多个激光源、激光扫描器以及一个或多个检测器,以及其他系统组件。相机可用于捕捉车辆100的周边环境的多个图像。相机可以是静态相机或视频相机。
控制系统140为控制车辆100及其组件的操作。控制系统140可包括各种元件,其中包括转向系统、油门、制动单元、计算机视觉系统、路线控制系统以及障碍物避免系统。转向系统可操作来调整车辆100的前进方向。例如在一个实施例中可以为方向盘系统。油 门用于控制引擎的操作速度并进而控制车辆100的速度。制动单元用于控制车辆100减速。制动单元可使用摩擦力来减慢车轮。在其他实施例中,制动单元可将车轮的动能转换为电流。制动单元也可采取其他形式来减慢车轮转速从而控制车辆100的速度。计算机视觉系统可以操作来处理和分析由相机捕捉的图像以便识别车辆100周边环境中的物体和/或特征。所述物体和/或特征可包括交通信号、道路边界和障碍物。计算机视觉系统可使用物体识别算法、运动中恢复结构(Structure from Motion,SFM)算法、视频跟踪和其他计算机视觉技术。在一些实施例中,计算机视觉系统可以用于为环境绘制地图、跟踪物体、估计物体的速度等等。路线控制系统用于确定车辆100的行驶路线。在一些实施例中,路线控制系统可结合来自传感器、GPS和一个或多个预定地图的数据以为车辆100确定行驶路线。
障碍物避免系统用于识别、评估和避免或者以其他方式越过车辆100的环境中的潜在障碍物。当然,在一个实例中,控制系统140可以增加或替换地包括除了所示出和描述的那些以外的组件。或者也可以减少一部分上述示出的组件。
车辆100通过外围设备150与外部传感器、其他车辆、其他计算机系统或用户之间进行交互。外围设备150可包括无线通信系统、车载电脑、麦克风和/或扬声器。在一些实施例中,外围设备150提供车辆100的用户与用户接口170交互的手段。例如,车载电脑可向车辆100的用户提供信息。用户接口170还可操作车载电脑来接收用户的输入。车载电脑可以通过触摸屏进行操作。在其他情况中,外围设备150可提供用于车辆100与位于车内的其它设备通信的手段。例如,麦克风可从车辆100的用户接收音频(例如,语音命令或其他音频输入)。类似地,扬声器可向车辆100的用户输出音频。无线通信系统可以直接地或者经由通信网络来与一个或多个设备无线通信。例如,无线通信系统可使用3G蜂窝通信,例如CDMA、EVD0、GSM/GPRS,或者4G蜂窝通信,例如LTE。或者5G蜂窝通信。无线通信系统146可利用WiFi与无线局域网(wireless local area network,WLAN)通信。在一些实施例中,无线通信系统可利用红外链路、蓝牙或ZigBee与设备直接通信。其他无线协议,例如各种车辆通信系统,例如,无线通信系统可包括一个或多个专用短程通信(dedicated short range communications,DSRC)设备,这些设备可包括车辆和/或路边台站之间的公共和/或私有数据通信。
电源160可向车辆100的各种组件提供电力。在一个实施例中,电源160可以为可再充电锂离子或铅酸电池。这种电池的一个或多个电池组可被配置为电源为车辆100的各种组件提供电力。在一些实施例中,电源160和能量源可一起实现,例如一些全电动车中那样。
用户接口170,用于向车辆100的用户提供信息或从其接收信息。可选地,用户接口170可包括在外围设备150的集合内的一个或多个输入/输出设备,例如无线通信系统、车车在电脑、麦克风和扬声器。
车辆100的部分或所有功能受计算机系统110控制。计算机系统110可包括至少一个处理器111,处理器111执行存储在例如数据存储装置这样的非暂态计算机可读介质中的指令。计算机系统110还可以是采用分布式方式控制车辆100的个体组件或子系统的多个计算设备。处理器111可以是任何常规的处理器,诸如商业可获得的CPU。替选地,该处理器可以是诸如ASIC或其它基于硬件的处理器的专用设备。本领域的普通技术人员应该 理解该处理器、计算机、或存储器实际上可以包括可以或者可以不存储在相同的物理外壳内的多个处理器、计算机、或存储器。例如,存储器可以是硬盘驱动器或位于不同于计算机的外壳内的其它存储介质。因此,对处理器或计算机的引用将被理解为包括对可以或者可以不并行操作的处理器或计算机或存储器的集合的引用。不同于使用单一的处理器来执行此处所描述的步骤,诸如转向组件和减速组件的一些组件每个都可以具有其自己的处理器,所述处理器只执行与特定于组件的功能相关的计算。
在此处所描述的各个方面中,处理器可以位于远离该车辆并且与该车辆进行无线通信。在其它方面中,此处所描述的过程中的一些在布置于车辆内的处理器上执行而其它则由远程处理器执行,包括采取执行单一操纵的必要步骤。
计算机系统110可基于从各种子系统(例如,行进系统120、传感系统130和控制系统140)以及从用户接口170接收的输入来控制车辆100的功能。例如,计算机系统110可利用来自控制系统140的输入以便控制转向单元来避免由传感系统130和障碍物避免系统检测到的障碍物。在一些实施例中,计算机系统112可操作来对车辆100及其子系统的许多方面提供控制。
可选地,上述这些组件中的一个或多个可与车辆100分开安装或关联。
可选地,上述组件只是一个示例,实际应用中,上述各个模块中的组件有可能根据实际需要增添或者删除,不应理解为对本发明实施例的限制。
上述车辆100可以为轿车、卡车、摩托车、公共汽车、船、飞机、直升飞机、割草机、娱乐车、游乐场车辆、施工设备、电车、高尔夫球车、火车、和手推车等,本发明实施例不做特别的限定。
可选地,计算机系统110可以包含多个处理器,不同的处理器处理不同业务的数据;例如,处理器A用于提供时间源,处理器B为处理器A的备份处理器,处理器C用于计算与自动驾驶业务相关的数据。
可选地,计算机系统可以包含一个处理器,该处理器内部按照功能划分为多个子处理模块,不同的子模块用于处理不同业务的数据。例如,子模块A用于提供时间源,子模块B用于处理与行车日志、车辆安全性能相关的数据。
可选地,车辆100可以包括一个或者多个计算机系统,例如计算机系统A为主用的计算机系统,计算机系统B为该主用的计算机系统的备份系统。可选地,计算机系统可以为SOC,即一片集成多功能的芯片。
可以理解的是,图1中的系统只是本发明实施例中的一种示例性的应用架构,本发明实施例中的应用架构包括但不仅限于以上应用架构。
下面本发明实施例以车辆的电路板部署两片芯片(即每片运行一个计算机系统,一个是主用计算机系统(以下简称主用系统),另一个是备用计算机系统(以下简称备用系统)),构成主备芯片为例进行描述。其中,在本发明实施例中两片芯片均可以为SOC,两个芯片之间可以通过总线连接。即主用计算机系统110和备用计算机系统110’。
请参见图2,图2是本发明实施例提供的一种自动驾驶硬件架构示意图;如图2所示,每片芯片都集成了多个内核(即多个处理器),例如,图2中的处理器301、处理器302、 处理器303和处理器304等。主用系统中的处理器301用于运行主用计算机系统上运行的操作系统(即主用操作系统,Master OS);备用系统中的处理器301’用于运行备用计算机系统上运行的操作系统(即备用操作系统,Backup OS);处理器303、处理器304、处理器303’以及处理器304’都是示例性的描述,对于具体的功能不作限定。处理器302和处理302’用于运行同一种AOOS,该操作系统是指自动驾驶系统中总是保持上电工作状态的一个子系统上的操作系统,在主备系统的Master OS以及Backup OS启动时,由该系统负责从板载RTC实时时钟获取时间,并将这个时间设置为Master OS和Backup OS的启动时间。可选地,当主用系统故障时,备用系统可以代替主用系统运行。并且,在主用系统正常工作的情况下,备用系统也可以执行与主用系统相同的计算业务,以验证主用系统的计算结果。
结合图2的主备用系统架构以及具体的部件逻辑关系,对本发明实施例涉及的一种硬件逻辑架构进行描述。请参见图3,图3是本发明实施例提供的一种硬件逻辑架构图;如图3所示,主用芯片(以SOC为例,以下的备用芯片也以SOC为例进行描述)110可以包括处理器111和存储器112,处理器111可以包括处理器301(即处理器1)、处理器302(即处理器2)、处理器303(即处理器3)和处理器304(即处理器4);
其中,处理器301用于运行Master OS,处理器2用于运行AO OS。
处理器303用于计算与自动驾驶相关的业务数据;所述与自动驾驶相关的业务数据包括各种传感器、中心计算节点、MCU控制节点、电源管理节点及安全监控节点等处理或者涉及的数据。具体地,前述业务数据涉及执行自动驾驶感知、融合和路径规划,以及车辆控制命令生成和下发等自动驾驶系统核心算法的驾驶业务逻辑;
处理器304用于计算与审计、日志、行车数据上云相关的管理数据。所述相关的管理数据包括安全审计、数字证书有效期检查、行车数据实时上云等涉及真实时间的数据。具体地,前述管理数据涉及自动驾驶业务配置数据下发流程,以及监控和记录自动驾驶业务运行状态的相关业务逻辑,比如设备管理、日志记录、车载黑匣子以及安全审计等。
主用SOC还可以包括其他一个或者多个处理器、存储器以及其他功能部件或者模块,如,图形处理器(Graphics Processing Unit,GPU),随机存取存储器(Random Access Memory,RAM)以及编码器等等。主用SOC连接信号接收模块(如GNSS模块)、端节点307(图3中示例性地列举了端节点1、端节点2、……、端节点Q,Q为大于0的整数;主用SOC向多个端节点提供时间基准,本发明实施例对具体的连接方式不作限定;其中,端节点可以为需要时间同步的端节点(End Point,EP),具体如车载激光雷达、毫米波雷达等传感器)、第一晶振305(该第一晶振可以为高精度的温补晶振)、时钟模块(例如RTC实时时钟芯片)。可选地,主用SOC还可以与备用SOC连接,进行芯片之间的通信和交互。
可选地,备份处理器(即备用SOC)在主用处理器(即主用SOC)正常工作的情况下,可以同时运行,用于处理与主用SOC相同的业务;例如,备用SOC的第一时间源跟踪主用SOC的第一时间源,将备用的时间相关计算结果与主用的时间相关计算进行比较,以达到校验主用SOC中第一时间源的时间准确性。在主用处理器故障时,停止跟踪主用SOC的第一时间源。
需要说明的是,备用SOC110’连接了温补晶振(即第二晶振)、RTC时钟芯片(即第二时钟模块),连接信号接收模块308;同时,备用SOC也与一个或者多个端节点连接,但在主用SOC正常运行的情况下不向各个端节点EP提供时间基准。
在图3所示的硬件逻辑架构基础上,下面对本发明实施例涉及的主用SOC的相关硬件结构和为自动驾驶提供时间源的方法进行描述;备用SOC的相关原理和方法可以参考主用SOC,在此不再赘述备用SOC以及其与主用SOC之间的连接情况。
请参见图4,图4是本发明实施例提供的一种硬件结构原理示意图;如图4所示,在本发明实施例中,第一晶振为温补晶振,第一时钟模块为RTC时钟芯片(即实时时钟芯片),卫星信号接收模块(或者信号接收模块)可以为GNSS模块,端节点EP以传感器为例;在本发明实施例中,主用SOC的硬件结构包括处理器301、处理器302、处理器303、处理器304、存储器112、总线桥401、系统总线402、I/O接口403、网络接口404等等;主用SOC还通过图示的I(专用CAN总线)与GNSS模块308连接,用于接收GNSS信号;通过图示的II(如SPI或者IIC总线)与RTC时钟芯片306连接,用于获取真实的实时时间;通过I/O接口403与传感器406连接,向传感器等端节点307提供时间基准;通过与电路板上的温补晶振305连接,获取温补晶振的振荡频率,以维持系统时间的运行。可选地,主用SOC还可以通过网络接口连接网络,以获取需要的信息或者实时数据。
结合图4所示的硬件结构,下面对本发明实施例涉及的为自动驾驶提供时间源的原理进行描述。请参见图5,图5是本发明实施例提供的一种为自动驾驶提供时间源的原理示意图;如图5所示,本发明实施例以主用SOC110中的处理器301、处理器302(运行AOOS)、处理器303和处理器304,以及GNSS模块(即信号接收模块)308、温补晶振305和板载RTC(即板载实时时钟芯片)306为例进行描述。在主用SOC的处理器301中部署两套时钟,分别为第一时间源OS-CLK和第二时间源GNSS-CLK。OS-CLK在无论车辆能否接受到GNSS信号的情况下,均依赖板上的温补晶振305运行;GNSS-CLK在车辆能够获得GNSS信号的情况下,根据GNSS信号追踪卫星提供的GNSS时间;在无法获得GNSS信号的情况下,通过GNSS模块的消息反馈(GNSS模块与C接口(即CAN接口,以下均以C接口表示CAN接口,后续不再说明)连接),切换至依赖温补晶振维持系统中时间的正常运转。在系统启动或者睡眠唤醒时,板载RTC向主用SOC以及备用SOC提供启动时刻,该启动时刻用于设置两片SOC内的OS-CLK以及GNSS-CLK。如图5所示,处理器301通过网口M(例如,网口M为万兆以太网口(Ten-GigabitEthernet,XGE))向局域网交换机(Lan Switch)发送时间同步消息(Anounce/Sync packet);再由局域网交换机作为边界时钟,将上述时间同步消息发送至多个端节点,以保障各个时间节点的时间同步。处理器301还可以为处理器303提供OS-CLK的时间同步消息,以及为处理器304提供GNSS-CLK的时间同步消息。可以理解的是,备用SOC的时间稳定原理以及结构与主用SOC基本相同,在此不再赘述。
可选地,备用SOC中Backup OS的OS-CLK还用于追踪主用SOC中Master OS的OS-CLK;请参见图6,图6是本发明实施例提供的另一种为自动驾驶提供时间源的原理示 意图。如图6所示,处理器302和处理器302’均运行同一种AOOS。其中,备用SOC的GNSS-CLK与主用SOC中的GNSS-CLK工作原理一致,主用SOC和备用SOC连接同一个信号接收模块(即GNSS模块308)。主备用SOC都自个连接不同的温补晶振,但是由于备用SOC的OS-CLK以主用SOC(即主用芯片)的OS-CLK的时间为基准,所以备用SOC(即备用芯片)在主用SOC正常运行的情况下,可以作为主用SOC的OS-CLK的次一级主时钟,向其他端节点提供时间基准,即相当于拓展了主用OS-CLK连接节点的网口或端口。例如,图6所示的Lan Switch 1(LSW1)既接收来自主用SOC的时间同步消息,也接收了来自备用SOC的时间同步消息。在主用SOC正常运行的情况下,备用和主用SOC提供的时间误差在可接受的范围内,对驾驶业务(例如对传感器采集数据的时间戳准确性)影响不大。LSW1可以选择主用SOC发送的时间同步消息为准;每一个LSW都同时与主备用SOC的相应网口连接。如图6所示,Lan Switch0/Lan Switch1作为内部的交换节点,内部也运行gPTP协议栈,并且充当802.1AS边界时钟,从其中的一个端口接收处理主用平面的一个Master端口发送的gPTP报文,基于协议算法测量计算本地时钟与Master时钟的偏差(时间偏差和频率偏差)以及路径延迟,调整本地时钟与Master时钟达到10us级同步精度(该步骤可选,行为上类似1588的Transparent Clock,仅仅修正gPTP event消息的驻留时间后转发gPTP evnet消息),成为该同步网络中次一级的Master Clock。之后,可以通过其Master clock端口,将时间同步消息Anounce和Sync等,持续发送给最终需要时间同步的端节点(End Point),如车载激光雷达、毫米波雷达等传感器节点。作为End Point的传感器,通过运行gPTP协议栈软件,接收和处理Anounce和Sync消息报文,并基于这些报文中携带的时间戳信息计算调整本地时钟与GMC时钟的偏差和路径传输时延,并调整本地时钟的时间,以保持与GMC时间的同步,通过这样一个时钟传递层次,使所有目的端节点的时间与GMC的时间偏差控制在设定的范围内,例如10us以内。
需要说明的是,图6所示内容是对图5所示内容的一种拓展,对于图6中未涉及的处理器303、处理器304以及处理器302等相应内容,在此不再赘述。
结合上述的硬件结构以及为自动驾驶提供时间源的原理等内容,下面对本发明实施例涉及的一种为自动驾驶提供时间源的方法进行描述,请参见图7,图7是本发明实施例提供的一种为自动驾驶提供时间源的方法的流程示意图;如图7所示,该方法以处理器301(即第一处理器)为执行主体,可以包括步骤S701-步骤S702。
步骤S701:通过第一晶体振荡器向所述自动驾驶系统的第一子系统提供第一时间源,以及根据接收到的卫星时间信号向所述自动驾驶系统的第二子系统提供第二时间源。
具体地,第一子系统用于处理所述车辆的行驶业务相关数据;所述第二子系统用于处理所述车辆的管理相关数据。请参见图8,图8是本发明实施例提供的一种时间源生成示意图;如图8所示,在系统启动之后且GNSS模块能够接收到GNSS信号(即卫星时间信号),为确保自动驾驶的安全,第一时间源(即OS-CLK)完全依赖板载的温补晶振(例如,精度为10ppm)运行;M网口内部的硬件时钟也被调整到与OS-CLK的一致时间,之后通过Master端口(即M网口),按照gPTP协议规范要求的频度,持续发出Anounce和Sync报文(即时间同步消息),使OS-CLK成为全网的主时钟。当GNSS信号可用时,基于GNSS 信号为第二时间源(即GNSS-CLK)提供基准频率,并且调整GNSS-CLK,保证其与GNSS时间源(即卫星的GNSS时间)同步,同步后其时钟与GNSS时间源误差控制在10us之内。其中,OS-CLK专用于自动驾驶计算业务(即第一子系统的业务),启动后仅依靠板载晶振运行,并且作为系统中时间同步网络中的根时钟(或者称主时钟),为自动驾驶平面其他节点提供全局时间源。GNSS-CLK用于车辆管理相关的业务(即第二子系统的业务)。可以理解的是,车辆中的业务平面基本分别驾驶平面和管理平面,驾驶平面用于车辆驾驶计算相关数据的处理,管理平面用于审计、日志记录、行车数据管理等相关数据的处理。驾驶平面以及管理平面都可以认为是包含或者对应一个或者多个子系统,如行进系统、传感器系统以及控制系统等等。
可选地,GNSS信号(包括时间位置)直接通过CAN总线及PPS时钟信号线接入系统;并且主备SOC都可以接收到该GNSS信号。通过该方式接入GNSS信号,保障了主用SOC的GNSS-CLK以及备用GNSS-CLK有效接收GNSS信号,保障信号传递的一致性,进一步保障后续时间源的稳定。
在一种可能的实现方式中,所述根据接收到的所述卫星时间信号向所述自动驾驶系统的第二子系统提供第二时间源,包括:将所述卫星时间信号作为所述第二时间源的基准频率,生成所述第二时间源,所述卫星时间信号为通过信号接收模块接收的;向所述第二子系统提供所述第二时间源。
步骤S702:在未接收到所述卫星时间信号的情况下,通过所述第一晶体振荡器向所述第二子系统提供所述第二时间源。
具体地,请参见图9,图9是本发明实施例提供的另一种时间源生成示意图;如图9所示,当GNSS模块跟踪不到卫星(即接收不到GNSS信号)时,GNSS模块本身还会输出时间,但是这个时间可能会发生缓慢漂移;GNSS-CLK在收到GNSS模块的反馈后,一般不会继续跟踪GNSS模块输出的时间,而是依赖第一晶体振荡器维持系统时间的正常计时服务。OS-CLK(即第一时间源)依旧依赖第一晶体振荡器维持系统时间的正常运行。其中,提供UTC时间服务,该时钟跟踪GNSS时间,为管理平面的事务提供UCT时间。可选地,GNSS-CLK可以选取某个不需要参与时间同步的网口硬件时钟或者使用纯软件方式实现一套,这个时钟在车辆冷启动或者睡眠唤醒之后,也是由AO OS提供初始启动时间之后。在GNSS可用时,跟踪GNSS时间源,GNSS不可用时,利用自身的晶振保持时间。以满足管理平面业务对UTC时间的需求。当然在跟踪GNSS时也可能发生时间跳变的问题,但不影响自动驾驶安全,对管理平面数据的时间准确性影响可忽略不计。
在一种可能的实现方式中,GNSS-CLK时钟需专门封装用户态和内核态的API接口给需要准确UTC时间的模块。用户态的API接口提供给用户在一般情况下对管理子系统中的供用户使用的时间信息进行操作和调整;而内核态的API接口提供给在必要情况下,获取对系统的时间进行人工调整和操作,对系统整体影响较大,一般需要取得相应的权限才可以通过该接口操作系统时间。可以理解的是,时间同步等操作认为是在内核这一层次进行的操作,对于用户而言,想要获取管理子系统中的时间(例如,维测日志的日期)只依靠用户态的接口是无法获取系统底层时间而只能获取经过处理的时间信息,需要通过内核态的接口才可以获取系统底层的时间。
在一种可能的实现方式中,从第一时钟模块获取启动时刻,所述启动时刻为所述第一时间源和第二时间源的启动时刻。请参见图10,图10是本发明实施例提供的一种启动时刻设置示意图;如图10中的①,AO OS(即处理器302运行的一个操作系统)从板载实时时钟芯片(即板载RTC,board RTC)306获取启动时间或启动时刻(如13:40)。并将该启动时间设置为Master OS(即处理器301)的启动时间;具体地,将该启动时间设置为OS-CLK和GNSS-CLK的启动时间。例如,在系统启动或者睡眠唤醒时,AO OS从板载RTC实时时钟获取启动时间,用以设置主用平面的OS-CLK和GNSS-CLK的启动时间。
在一种可能的实现方式中,主备用SOC通过网口直接连接,其中,备用SOC的OS-CLK基于TSN协议跟踪主用平面的OS-CLK。请参见图11,图11是本发明实施例提供的一种主备用SOC连接示意图;如图11中的②所示,主用SOC连接温补晶振305,由温补晶振305向OS-CLK提供基准震荡频率;OS-CLK作为对应时钟系统中的主时钟,向处理器303(用于处理自动驾驶相关业务)、多个M网口(用于向端节点发送时间按同步消息,以及向备用SOC110’提供时间基准)。如图11中的③-④所示,主用SOC和备用SOC连接不同的温补晶振,但是该误差可以被M网口与S网口连接的方式修正。备用SOC虽然依赖不同温补晶振,但是在主用SOC正常运行的情况下,仍然以跟踪主用SOC的OS-CLK来作为时间基准。其中,Master端口时钟,指gPTP协议规定的一种时钟角色,处于Master状态的端口时钟才可以对外发送时间同步消息,具有更高的时钟准确度。Slave端口时钟指gPTP协议规定的一种时钟角色,处于Slave状态的端口时钟不允许对外发送时间同步消息,只能接收处理上级Master时钟发送的同步消息,且需要调整时钟以保持与Master时钟的同步。在本发明实施例中,主备用SOC构成一对Master端口时钟和Slave端口时钟。可以理解的是,主用SOC和其他边界时钟,或者下一级节点也分别构成一对Master端口时钟和Slave端口时钟。
在一种可能的实现方式中,所述方法还包括:根据预设的调整周期,基于所述第二时间源同步第三时间源,所述第三时间源为所述第一时钟模块提供的时间源。请参见图12,图12是本发明实施例提供的一种时间源调整流程示意图;如图12的①-④所示,首先,在调整周期内,通过GNSS接口接收GNSS模块反馈的当前GNSS时间;GNSS-CLK追踪GNSS信号;通过AOOS将RTC的时间与GNSS-CLK的GNSS时间同步。
例如,由于自动驾驶计算相关的时钟OS-CLK,在车辆冷启动或者睡眠唤醒之后,由AO OS提供初始启动时间,之后,完全依靠自身晶振来维持OS时钟的运行,不再跟踪GNSS时间源;单板上其他节点利用gPTP协议来跟踪这个OS-CLK来达到全网时钟同步的目标。这种情况下,由于自身晶振的漂移,会导致OS-CLK逐步走偏,其他节点的时钟也会跟随走偏。因此,在自动驾驶过程中,使用GNSS-CLK定期调整RTC时钟,以保持RTC时钟跟GNSS时钟同步的方法,使用这种方法,可以保证车辆每次启动后,自动驾驶系统的时间与UTC时间相差不会太大,可有效防止OS-CLK的时间无限漂移。
在上述发明实施例中,单板部署了三套具备独立晶振的时钟:OS-CLK,GNSS-CLK,RTC-CLK。由于自动驾驶平面OS-CLK主要依赖板载温度补偿晶振的自振荡运行,为防止温补晶振异常或者失效,必须要对温补晶振的运行状态进行健康监控。 据此设计一个定时(例如50ms)监控程序,以防止由于晶振本身的异常导致根时钟的时间发生跳变而影响自动驾驶的安全性。所以采用本发明实施例提供的监控算法来监控并调整OS-CLK。
具体算法如下:
确定三组时间源的频率比,其中,所述三组时间源的频率比包括所述第一时间源与所述第二时间源的第一频率比、所述第一时间源与所述第三时间源的第二频率比、以及所述第二时间源与所述第三时间源的第三频率比;
根据所述三组时间源的频率比和所述三组时间源中每一个组对应的历史频率比,确定所述三组时间源中每一组时间源的频率比差值,其中,所述三组时间源的频率比差值包括所述第一频率比与历史第一频率比的第一频率比差值、所述第二频率比与历史第二频率比的第二频率比差值、以及所述第三频率比与历史第三频率比的第三频率比差值;
根据所述第一频率比差值、所述第二频率比差值和所述第三频率比差值,确定第一时间源、第二时间源或者第三时间源中目标时间源对应的的晶体振荡器频率偏离预设频率范围。
在一种可能的实现方式中,所述确定三组时间源的频率比,包括:
通过公式
Figure PCTCN2019119754-appb-000019
Figure PCTCN2019119754-appb-000020
Figure PCTCN2019119754-appb-000021
确定所述第一频率比FR1、所述第二频率比FR2和所述第三频率比FR3;其中,OS_CLK Frequency为所述第一时间源的时钟频率;GNSS_CLK Frequency为所述第二时间源的时钟频率;RTC_CLK Frequency为所述第三时间源的时钟频率。
可选地,在运行过程中,每个物理时钟的频率其实有都抖动的,因此两个时钟的频率比也是会有抖动的。根据802.1-AS协议中推荐的方法,可以通过定时的连续测量两个时钟的时间戳序列,这个序列的大小是固定的,比如每个时钟的时间戳序列内部存储7到10个时间戳;这个时间戳序列可以使用一个队列方式实现,队列变满之后,每次有新的时间戳进入队列时,队列尾部的最旧的时间戳会别淘汰掉。然后使用两个时钟的时间戳序列的首尾时间戳相减后的差值比为:
Figure PCTCN2019119754-appb-000022
例如,TN可以是第七个时间戳,T0可以是第一个时间戳。差值为第一个时间戳与第七个时间戳之间的时间。
上述差值的倒数比作为两个时钟的频率比:
Figure PCTCN2019119754-appb-000023
在一种可能的实现方式中,所述根据所述三组时间源的频率比和所述三组频率比中每一个组对应的历史频率比,确定所述三组时间源的频率比差值,包括:
通过公式
ΔFR1=abs(FR1-FR1 AVG)
ΔFR2=abs(FR2-FR2 AVG)
ΔFR3=abs(FR3-FR3 AVG)
确定所述第一频率比差值ΔFR1、所述第二频率比差值ΔFR2和所述第三频率比差值ΔFR3;其中,abs(FR1-FR1 AVG)为所述第一频率比与所述历史第一频率比的差值的绝对值;abs(FR2-FR2 AVG)为所述第二频率比与所述历史第二频率比的差值的绝对值;abs(FR3-FR3 AVG)为所述第三频率比与所述历史第三频率比的差值的绝对值。例如,两个CLK的当前最新测量到的频率比可以标记为FR_Curr(即上述公式的FR1),ΔFR定义为当前频率比与历史平均频率比的差值。则正常情况下,ΔFR是在一个可以预期的合理值范围内的变动,而三组时钟的频率同时发生跳变或失效的概念可为无限小,因此可以推断:如果某个ΔFR突然变大超出设定的门限值,则可以推断这两个时钟之一有失效的嫌疑,具体是哪一个,可以通过三次比较找出来,例如:OS-CLK与GNSS-CLK间的频率比变化ΔFR1;OS-CLK与RTC-CLK间的频率比变化ΔFR2;GNSS-CLK与RTC-CLK间的频率比变化ΔFR3。
可选地,基于投票原理来找出到底是哪一个时钟的晶振发生异常,因为三组时钟的频率同时发生跳变或失效的概率无限小,可以认为不会发生。如果ΔFR1和ΔFR2突然变动而超出门限,但是ΔFR3在正常值范围,则可以判断OS-CLK时钟的晶振频率异常。
可选地,一旦检测到时钟晶振频率异常,需要向上层管理平面上报时钟异常告警。
上面提及了需要计算频率比的均值,下面提供了一种历史频率均值计算方法,所述方法还包括:
根据预设的测量周期,确定第k个第一频率比、第k个第二频率比和第k个第三频率比,直至确定N个第一频率比、N个第二频率比和N个第三频率比;0<k≤N,k为整数;
根据所述N个第一频率比、所述N个第二频率比和所述N个第三频率比,确定所述三组频率比中每一个组对应的历史频率比,其中,所述三组频率比中每一个组对应的历史频率比,包括所述第一频率比对应的第一历史频率比、所述第二频率比对应的第二历史频率比、所述第三频率比对应的第三历史频率比。
在一种可能的实现方式中,所述根据所述N个第一频率比、所述N个第二频率比和所述N个第三频率比,确定所述三组频率比中每一个组对应的历史频率比,包括:
通过公式
Figure PCTCN2019119754-appb-000024
Figure PCTCN2019119754-appb-000025
Figure PCTCN2019119754-appb-000026
确定所述第一历史频率比FR1 AVG、所述第二历史频率比FR2 AVG、所述第三历史频率比FR3 AVG;其中,fr1 1、fr1 2、fr1 3、…、fr1 N分别为第1个第一频率比、第2个第一频率比、第3个第一频率比、…、第N个第一频率比;fr2 1、fr2 2、fr2 3、…、fr2 N分别为第1个第二频率比、第2个第二频率比、第3个第二频率比、…、第N个第二频率比;fr3 1、fr3 2、fr3 3、…、fr3 N分别为第1个第三频率比、第2个第三频率比、第3个第三频率比、…、第N个第三频率比。其中N可以表示最新的频率比样本数量,可取值为7到10之间。
可选地,由于上述晶振失效检测方法由软件实现,由于软件要采集处理计算大量数据,而且还依赖OS的调度策略,可能导致检测结果不够及时,可以考虑使用专门的硬件逻辑电路实现,或将这些硬件检测逻辑写入到板载的CPLD器件中实现更加快速准确的晶振失效检测。
上述详细阐述了本发明实施例的方法,下面提供了本发明实施例的相关虚拟装置。
请参见图13,图13是本发明实施例提供的一种为自动驾驶提供时间源的装置的结构示意图;所述为自动驾驶提供时间源的装置131包括第一时间源单元131、第二时间源单元132、调整单元133、计算单元134、比较单元135、确定单元136、测量单元137和历史频率比单元138。其中,
第一时间源单元131,用于通过第一晶体振荡器向所述自动驾驶系统的第一子系统提供第一时间源,以及根据接收到的卫星时间信号向所述自动驾驶系统的第二子系统提供第二时间源。
在一种可能的实现方式中,所述装置还包括第二时间源单元132,用于:
在未接收到所述卫星时间信号的情况下,通过第一晶体振荡器向所述第二子系统提供所述第二时间源。
在一种可能的实现方式中,所述第一时间源单元131,具体用于:
将所述卫星时间信号作为所述第二时间源的基准频率,生成所述第二时间源,所述卫星时间信号为通过信号接收模块接收的;
向所述第二子系统提供所述第二时间源。
在一种可能的实现方式中,所述装置还包括调整单元133,用于:
根据预设的调整周期,基于所述第二时间源同步第三时间源,所述第三时间源为所述第一时钟模块提供的时间源。
在一种可能的实现方式中,所述装置还包括:
计算单元134,用于确定三组时间源的频率比,其中,所述三组时间源的频率比包括所述第一时间源与所述第二时间源的第一频率比、所述第一时间源与所述第三时间源的第二频率比、以及所述第二时间源与所述第三时间源的第三频率比;
比较单元135,用于根据所述三组时间源的频率比和所述三组时间源中每一个组对应的历史频率比,确定所述三组时间源中每一组时间源的频率比差值,其中,所述三组时间源的频率比差值包括所述第一频率比与历史第一频率比的第一频率比差值、所述第二频率 比与历史第二频率比的第二频率比差值、以及所述第三频率比与历史第三频率比的第三频率比差值;
确定单元136,用于根据所述第一频率比差值、所述第二频率比差值和所述第三频率比差值,确定第一时间源、第二时间源或者第三时间源中目标时间源对应的的晶体振荡器频率偏离预设频率范围。
在一种可能的实现方式中,所述计算单元134,具体用于:
通过公式
Figure PCTCN2019119754-appb-000027
Figure PCTCN2019119754-appb-000028
Figure PCTCN2019119754-appb-000029
确定所述第一频率比FR1、所述第二频率比FR2和所述第三频率比FR3;其中,OS_CLK Frequency为所述第一时间源的时钟频率;GNSS_CLK Frequency为所述第二时间源的时钟频率;RTC_CLK Frequency为所述第三时间源的时钟频率。
在一种可能的实现方式中,所述比较单元135,具体用于:
通过公式
ΔFR1=abs(FR1-FR1 AVG)
ΔFR2=abs(FR2-FR2 AVG)
ΔFR3=abs(FR3-FR3 AVG)
确定所述第一频率比差值ΔFR1、所述第二频率比差值ΔFR2和所述第三频率比差值ΔFR3;其中,abs(FR1-FR1 AVG)为所述第一频率比与所述历史第一频率比的差值的绝对值;abs(FR2-FR2 AVG)为所述第二频率比与所述历史第二频率比的差值的绝对值;abs(FR3-FR3 AVG)为所述第三频率比与所述历史第三频率比的差值的绝对值。
在一种可能的实现方式中,所述装置还包括:
测量单元137,用于根据预设的测量周期,确定第k个第一频率比、第k个第二频率比和第k个第三频率比,直至确定N个第一频率比、N个第二频率比和N个第三频率比;0<k≤N,k为整数;
历史频率比单元138,用于根据所述N个第一频率比、所述N个第二频率比和所述N个第三频率比,确定所述三组频率比中每一个组对应的历史频率比,其中,所述三组频率比中每一个组对应的历史频率比,包括所述第一频率比对应的第一历史频率比、所述第二频率比对应的第二历史频率比、所述第三频率比对应的第三历史频率比。
在一种可能的实现方式中,所述历史频率比单元138,具体用于:
通过公式
Figure PCTCN2019119754-appb-000030
Figure PCTCN2019119754-appb-000031
Figure PCTCN2019119754-appb-000032
确定所述第一历史频率比FR1 AVG、所述第二历史频率比FR2 AVG、所述第三历史频率比FR3 AVG;其中,fr1 1、fr1 2、fr1 3、…、fr1 N分别为第1个第一频率比、第2个第一频率比、第3个第一频率比、…、第N个第一频率比;fr2 1、fr2 2、fr2 3、…、fr2 N分别为第1个第二频率比、第2个第二频率比、第3个第二频率比、…、第N个第二频率比;fr3 1、fr3 2、fr3 3、…、fr3 N分别为第1个第三频率比、第2个第三频率比、第3个第三频率比、…、第N个第三频率比。
在一种可能的实现方式中,所述第一晶体振荡器为温度补偿晶体振荡器。
需要说明的是,本发明实施例中所描述的为自动驾驶提供时间源的装置可参见上述图7中所述的方法实施例中的为自动驾驶提供时间源的方法的相关描述,此处不再赘述。
如图14所示,图14是本发明实施例提供的一种芯片的结构示意图。一种为自动驾驶提供时间源的装置13,可以以图14中的结构来实现,该设备14包括至少一个处理器141,至少一个存储器142。此外,该设备还可以包括天线等通用部件,在此不再详述。
处理器141可以是通用中央处理器(CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制以上方案程序执行的集成电路。
存储器142可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。
其中,所述存储器142用于存储执行以上方案的应用程序代码,并由处理器141来控制执行。所述处理器141用于执行所述存储器142中存储的应用程序代码。
图14所示的芯片为为自动驾驶提供时间源的装置时,存储器142存储的代码可执行以上图7提供的为自动驾驶提供时间源的方法,比如,在接收到卫星时间信号的情况下,通过第一晶体振荡器向所述自动驾驶系统的第一子系统提供第一时间源,以及根据接收到的所述卫星时间信号向所述自动驾驶系统的第二子系统提供第二时间源。
需要说明的是,本发明实施例中所描述的芯片14的功能可参见上述图7中的所述的方法实施例中的相关描述,此处不再赘述。
本发明实施例还提供了一种搭载自动驾驶系统的车辆,请参见图15,图15是本发明实施例提供的一种车辆示意图;如图15所示,所述车辆15包括车载计算机151,所述车 辆15可以接收卫星16发送的卫星时间信号。所述车载计算机可以执行上述图7-图12对应的方法实施例中记载的任意一种的部分或全部步骤。例如,在接受到卫星时间信号时,提供依赖第一晶振运行的第一时间源和依赖卫星信号运行的第二时间源;在未接受到卫星时间信号时,提供仍旧依赖第一晶振运行的第一时间源和切换至依赖第一晶振运行的第二时间源。可选地,所述车辆还可以包括备用车载计算机,以防止自动驾驶系统发生单点失效故障,提高系统整体的可靠性。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可能可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以为个人计算机、服务器或者网络设备等,具体可以是计算机设备中的处理器)执行本申请各个实施例上述方法的全部或部分步骤。其中,而前述的存储介质可包括:U盘、移动硬盘、磁碟、光盘、只读存储器(Read-Only Memory,缩写:ROM)或者随机存取存储器(Random Access Memory,缩写:RAM)等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (22)

  1. 一种为自动驾驶提供时间源的装置,其特征在于,应用于车辆的自动驾驶系统,包括:第一处理器、以及与所述第一处理器连接的第一晶体振荡器;其中,
    所述第一处理器,用于通过所述第一晶体振荡器向所述自动驾驶系统的第一子系统提供第一时间源,以及根据接收到的卫星时间信号向所述自动驾驶系统的第二子系统提供第二时间源;所述第一子系统用于处理所述车辆的行驶业务相关数据;所述第二子系统用于处理所述车辆的管理相关数据。
  2. 根据权利要求1所述的装置,其特征在于,所述第一处理器,还用于:
    在未接收到所述卫星时间信号的情况下,通过所述第一晶体振荡器向所述第二子系统提供所述第二时间源。
  3. 根据权利要求1或2所述的装置,其特征在于,所述装置还包括与所述第一处理器连接的信号接收模块;所述信号接收模块,用于在接收到所述卫星时间信号的情况下,根据所述卫星时间信号向所述第二时间源提供基准频率;
    所述第一处理器,具体用于:
    根据所述基准频率生成所述第二时间源,向所述第二子系统提供所述第二时间源。
  4. 根据权利要求1-3任一项所述的装置,其特征在于,所述装置还包括:与所述第一处理器连接的第一时钟模块;
    所述第一时钟模块,用于根据预设的调整周期,基于所述第二时间源同步第三时间源,所述第三时间源为所述第一时钟模块提供的时间源。
  5. 根据权利要求4所述的装置,其特征在于,所述第一处理器,还用于:
    确定三组时间源的频率比,其中,所述三组时间源的频率比包括所述第一时间源与所述第二时间源的第一频率比、所述第一时间源与所述第三时间源的第二频率比、以及所述第二时间源与所述第三时间源的第三频率比;
    根据所述三组时间源的频率比和所述三组时间源中每一个组对应的历史频率比,确定所述三组时间源中每一组时间源的频率比差值,其中,所述三组时间源的频率比差值包括所述第一频率比与历史第一频率比的第一频率比差值、所述第二频率比与历史第二频率比的第二频率比差值、以及所述第三频率比与历史第三频率比的第三频率比差值;
    根据所述第一频率比差值、所述第二频率比差值和所述第三频率比差值,确定第一时间源、第二时间源或者第三时间源中目标时间源对应的晶体振荡器频率偏离预设频率范围。
  6. 根据权利要求5所述的装置,其特征在于,所述第一处理器,具体用于:
    通过公式
    Figure PCTCN2019119754-appb-100001
    Figure PCTCN2019119754-appb-100002
    Figure PCTCN2019119754-appb-100003
    确定所述第一频率比FR1、所述第二频率比FR2和所述第三频率比FR3;其中,OS_CLK Frequency为所述第一时间源的时钟频率;GNSS_CLK Frequency为所述第二时间源的时钟频率;RTC_CLK Frequency为所述第三时间源的时钟频率。
  7. 根据权利要求5或6所述的装置,其特征在于,所述第一处理器,具体用于:
    通过公式
    ΔFR1=abs(FR1-FR1 AVG)
    ΔFR2=abs(FR2-FR2 AVG)
    ΔFR3=abs(FR3-FR3 AVG)
    确定所述第一频率比差值ΔFR1、所述第二频率比差值ΔFR2和所述第三频率比差值ΔFR3;其中,abs(FR1-FR1 AVG)为所述第一频率比与所述历史第一频率比的差值的绝对值;abs(FR2-FR2 AVG)为所述第二频率比与所述历史第二频率比的差值的绝对数值;abs(FR3-FR3 AVG)为所述第三频率比与所述历史第三频率比的差值的绝对值。
  8. 根据权利要求5-7任一项所述的装置,其特征在于,所述第一处理器,还用于:
    根据预设的测量周期,确定第k个第一频率比、第k个第二频率比和第k个第三频率比,直至确定N个第一频率比、N个第二频率比和N个第三频率比;0<k≤N,k为整数;
    根据所述N个第一频率比、所述N个第二频率比和所述N个第三频率比,确定所述三组频率比中每一个组对应的历史频率比,其中,所述三组频率比中每一个组对应的历史频率比,包括所述第一频率比对应的第一历史频率比、所述第二频率比对应的第二历史频率比、所述第三频率比对应的第三历史频率比。
  9. 根据权利要求8所述的装置,其特征在于,所述第一处理器,具体用于:
    通过公式
    Figure PCTCN2019119754-appb-100004
    Figure PCTCN2019119754-appb-100005
    Figure PCTCN2019119754-appb-100006
    确定所述第一历史频率比FR1 AVG、所述第二历史频率比FR2 AVG、所述第三历史频率比FR3 AVG;其中,fr1 1、fr1 2、fr1 3、…、fr1 N分别为第1个第一频率比、第2个第一频率比、第3个第一频率比、…、第N个第一频率比;fr2 1、fr2 2、fr2 3、…、fr2 N分别为第1个第二频率比、第2个第二频率比、第3个第二频率比、…、第N个第二频率比;fr3 1、fr3 2、fr3 3、…、fr3 N分别为第1个第三频率比、第2个第三频率比、第3个第三频率比、…、第N个第三频率比。
  10. 根据权利要求1-9任一项所述的装置,其特征在于,所述装置还包括:与所述第一处理器连接的第二处理器,其中,
    所述第二处理器为所述第一处理器的备份处理器;
    所述第二处理器还分别与第二晶体振荡器以及第二时钟模块连接;所述第二晶体振荡器,为所述第一晶体振荡器的备份晶体振荡器;所述第二时钟模块,为所述第一时钟模块的备份模块。
  11. 根据权利要求1-10任一项所述的装置,其特征在于,所述第一晶体振荡器为温度补偿晶体振荡器。
  12. 一种为自动驾驶提供时间源的方法,其特征在于,应用于车辆的自动驾驶系统,所述方法包括:
    通过第一晶体振荡器向所述自动驾驶系统的第一子系统提供第一时间源,以及根据接收到的卫星时间信号向所述自动驾驶系统的第二子系统提供第二时间源;所述第一子系统用于处理所述车辆的行驶业务相关数据;所述第二子系统用于处理所述车辆的管理相关数据。
  13. 根据权利要求12所述的方法,其特征在于,所述方法还包括:
    在未接收到所述卫星时间信号的情况下,通过所述第一晶体振荡器向所述第二子系统提供所述第二时间源。
  14. 根据权利要求12或13所述的方法,其特征在于,所述根据接收到的所述卫星时间信号向所述自动驾驶系统的第二子系统提供第二时间源,包括:
    将所述卫星时间信号作为所述第二时间源的基准频率,生成所述第二时间源,所述卫星时间信号为通过信号接收模块接收的;
    向所述第二子系统提供所述第二时间源。
  15. 根据权利要求12-14任一项所述的装置,其特征在于,所述方法还包括:
    根据预设的调整周期,基于所述第二时间源同步第三时间源,所述第三时间源为所述第一时钟模块提供的时间源。
  16. 根据权利要求15所述的方法,其特征在于,所述方法还包括:
    确定三组时间源的频率比,其中,所述三组时间源的频率比包括所述第一时间源与所述第二时间源的第一频率比、所述第一时间源与所述第三时间源的第二频率比、以及所述第二时间源与所述第三时间源的第三频率比;
    根据所述三组时间源的频率比和所述三组时间源中每一个组对应的历史频率比,确定所述三组时间源中每一组时间源的频率比差值,其中,所述三组时间源的频率比差值包括所述第一频率比与历史第一频率比的第一频率比差值、所述第二频率比与历史第二频率比的第二频率比差值、以及所述第三频率比与历史第三频率比的第三频率比差值;
    根据所述第一频率比差值、所述第二频率比差值和所述第三频率比差值,确定第一时间源、第二时间源或者第三时间源中目标时间源对应的的晶体振荡器频率偏离预设频率范围。
  17. 根据权利要求16所述的方法,其特征在于,所述确定三组时间源的频率比,包括:
    通过公式
    Figure PCTCN2019119754-appb-100007
    Figure PCTCN2019119754-appb-100008
    Figure PCTCN2019119754-appb-100009
    确定所述第一频率比FR1、所述第二频率比FR2和所述第三频率比FR3;其中,OS_CLK Frequency为所述第一时间源的时钟频率;GNSS_CLK Frequency为所述第二时间源的时钟频率;RTC_CLK Frequency为所述第三时间源的时钟频率。
  18. 根据权利要求16或17所述的方法,其特征在于,所述根据所述三组时间源的频率比和所述三组频率比中每一个组对应的历史频率比,确定所述三组时间源的频率比差值,包括:
    通过公式
    ΔFR1=abs(FR1-FR1 AVG)
    ΔFR2=abs(FR2-FR2 AVG)
    ΔFR3=abs(FR3-FR3 AVG)
    确定所述第一频率比差值ΔFR1、所述第二频率比差值ΔFR2和所述第三频率比差值ΔFR3;其中,abs(FR1-FR1 AVG)为所述第一频率比与所述历史第一频率比的差值的绝对值;abs(FR2-FR2 AVG)为所述第二频率比与所述历史第二频率比的差值的绝对值;abs(FR3-FR3 AVG)为所述第三频率比与所述历史第三频率比的差值的绝对值。
  19. 根据权利要求16-18任一项所述的方法,其特征在于,所述方法还包括:
    根据预设的测量周期,确定第k个第一频率比、第k个第二频率比和第k个第三频率比,直至确定N个第一频率比、N个第二频率比和N个第三频率比;0<k≤N,k为整数;
    根据所述N个第一频率比、所述N个第二频率比和所述N个第三频率比,确定所述三组频率比中每一个组对应的历史频率比,其中,所述三组频率比中每一个组对应的历史频率比,包括所述第一频率比对应的第一历史频率比、所述第二频率比对应的第二历史频率比、所述第三频率比对应的第三历史频率比。
  20. 根据权利要求19所述的方法,其特征在于,所述根据所述N个第一频率比、所述N个第二频率比和所述N个第三频率比,确定所述三组频率比中每一个组对应的历史频率比,包括:
    通过公式
    Figure PCTCN2019119754-appb-100010
    Figure PCTCN2019119754-appb-100011
    Figure PCTCN2019119754-appb-100012
    确定所述第一历史频率比FR1 AVG、所述第二历史频率比FR2 AVG、所述第三历史频率比FR3 AVG;其中,fr1 1、fr1 2、fr1 3、…、fr1 N分别为第1个第一频率比、第2个第一频率比、 第3个第一频率比、…、第N个第一频率比;fr2 1、fr2 2、fr2 3、…、fr2 N分别为第1个第二频率比、第2个第二频率比、第3个第二频率比、…、第N个第二频率比;fr3 1、fr3 2、fr3 3、…、fr3 N分别为第1个第三频率比、第2个第三频率比、第3个第三频率比、…、第N个第三频率比。
  21. 根据权利要求12-20任一项所述的方法,其特征在于,所述第一晶体振荡器为温度补偿晶体振荡器。
  22. 一种芯片系统,其特征在于,所述芯片系统执行如权利要求12-21中任意一项所述的方法得以实现。
PCT/CN2019/119754 2019-11-20 2019-11-20 一种为自动驾驶提供时间源的方法及装置 WO2021097718A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
PCT/CN2019/119754 WO2021097718A1 (zh) 2019-11-20 2019-11-20 一种为自动驾驶提供时间源的方法及装置
EP19953177.3A EP4044467A4 (en) 2019-11-20 2019-11-20 METHOD AND APPARATUS FOR PROVIDING A TIME SOURCE FOR AN AUTOMATIC DRIVE
CN201980102106.3A CN114641951A (zh) 2019-11-20 2019-11-20 一种为自动驾驶提供时间源的方法及装置
JP2022529367A JP7385033B2 (ja) 2019-11-20 2019-11-20 自動運転のための時間源を提供するための方法および装置
US17/748,849 US20220278745A1 (en) 2019-11-20 2022-05-19 Method and apparatus for providing time source for autonomous driving

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/119754 WO2021097718A1 (zh) 2019-11-20 2019-11-20 一种为自动驾驶提供时间源的方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/748,849 Continuation US20220278745A1 (en) 2019-11-20 2022-05-19 Method and apparatus for providing time source for autonomous driving

Publications (1)

Publication Number Publication Date
WO2021097718A1 true WO2021097718A1 (zh) 2021-05-27

Family

ID=75980342

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/119754 WO2021097718A1 (zh) 2019-11-20 2019-11-20 一种为自动驾驶提供时间源的方法及装置

Country Status (5)

Country Link
US (1) US20220278745A1 (zh)
EP (1) EP4044467A4 (zh)
JP (1) JP7385033B2 (zh)
CN (1) CN114641951A (zh)
WO (1) WO2021097718A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023019984A1 (zh) * 2021-08-16 2023-02-23 华为技术有限公司 控制系统的时钟同步方法以及控制系统
WO2023045728A1 (zh) * 2021-09-27 2023-03-30 华为技术有限公司 一种时钟同步的方法、装置和车辆
WO2023141817A1 (zh) * 2022-01-26 2023-08-03 华为技术有限公司 一种时间同步方法、装置及存储介质
US20230319742A1 (en) * 2022-04-05 2023-10-05 Meta Platforms, Inc. Peripheral time server device

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114647179A (zh) * 2020-12-18 2022-06-21 华为技术有限公司 主时钟装置、从时钟装置和时间同步方法
CN115348657B (zh) * 2022-08-15 2024-02-13 小米汽车科技有限公司 用于车辆时间同步的系统、方法及车辆
CN115079624B (zh) * 2022-08-23 2022-11-15 小米汽车科技有限公司 用于车辆绝对时间发布的车载控制器、方法及车辆
CN115694704A (zh) * 2022-10-28 2023-02-03 重庆长安汽车股份有限公司 一种时间同步方法、装置、设备及存储介质
CN115842599A (zh) * 2022-11-30 2023-03-24 重庆长安汽车股份有限公司 自动驾驶的冗余时间同步方法、装置、系统车辆及介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103716107A (zh) * 2012-10-01 2014-04-09 英特尔移动通信有限责任公司 时钟分发系统和方法
CN103913987A (zh) * 2014-04-26 2014-07-09 广西电网公司电力科学研究院 Gps授时系统及其获得精确时间基准的方法
US20180101139A1 (en) * 2016-10-11 2018-04-12 Northrop Grumman Systems Corporation Atomic clock system

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001221874A (ja) * 2000-02-14 2001-08-17 Toshiba Corp 時刻同期方式
CN101068133B (zh) * 2007-06-12 2011-05-04 华为技术有限公司 时间同步方法、网络通信系统及其设备
US10021661B2 (en) * 2015-11-24 2018-07-10 At&T Mobility Ii Llc Meshed GPS time synchronized network
US10101747B2 (en) 2015-12-11 2018-10-16 Uber Technologies, Inc. Formatting sensor data for use in autonomous vehicle communications platform
JP2019008709A (ja) 2017-06-28 2019-01-17 京セラ株式会社 車両、情報処理システム、情報処理装置、およびデータ構造
US11349589B2 (en) 2017-08-04 2022-05-31 Metrom Rail, Llc Methods and systems for decentralized rail signaling and positive train control
US10566084B2 (en) 2017-08-23 2020-02-18 Ntt Innovation Institute, Inc. System and method for racing data analysis using telemetry data and wearable sensor data
US20190286151A1 (en) 2018-03-14 2019-09-19 GM Global Technology Operations LLC Automated driving systems and control logic for cloud-based scenario planning of autonomous vehicles
US20190313224A1 (en) 2018-04-10 2019-10-10 GM Global Technology Operations LLC Automated vehicle systems and control logic for smart data exchanges using enhanced bloom filters
US10365364B1 (en) 2018-05-18 2019-07-30 Zendar Inc. Systems and methods for detecting objects
CN113874751A (zh) * 2019-04-30 2021-12-31 甄达公司 用于组合雷达数据的系统和方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103716107A (zh) * 2012-10-01 2014-04-09 英特尔移动通信有限责任公司 时钟分发系统和方法
CN103913987A (zh) * 2014-04-26 2014-07-09 广西电网公司电力科学研究院 Gps授时系统及其获得精确时间基准的方法
US20180101139A1 (en) * 2016-10-11 2018-04-12 Northrop Grumman Systems Corporation Atomic clock system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4044467A4 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023019984A1 (zh) * 2021-08-16 2023-02-23 华为技术有限公司 控制系统的时钟同步方法以及控制系统
WO2023045728A1 (zh) * 2021-09-27 2023-03-30 华为技术有限公司 一种时钟同步的方法、装置和车辆
WO2023141817A1 (zh) * 2022-01-26 2023-08-03 华为技术有限公司 一种时间同步方法、装置及存储介质
US20230319742A1 (en) * 2022-04-05 2023-10-05 Meta Platforms, Inc. Peripheral time server device

Also Published As

Publication number Publication date
CN114641951A (zh) 2022-06-17
JP7385033B2 (ja) 2023-11-21
US20220278745A1 (en) 2022-09-01
JP2023502671A (ja) 2023-01-25
EP4044467A1 (en) 2022-08-17
EP4044467A4 (en) 2022-11-30

Similar Documents

Publication Publication Date Title
WO2021097718A1 (zh) 一种为自动驾驶提供时间源的方法及装置
US11875686B2 (en) Systems and methods for managing communications between vehicles
US20210325207A1 (en) Map updating system and method for autonomous driving
WO2020133208A1 (zh) 一种自动驾驶车辆的控制方法和自动驾驶系统
CN110431606B (zh) 通过协作定位而改善的asil定级
US10567923B2 (en) Computation service for mobile nodes in a roadway environment
CN110880236B (zh) 路况信息处理方法、装置及系统
WO2021047271A1 (zh) 一种时间同步方法及装置
US11495131B2 (en) Vehicle to vehicle safety messaging congestion control for platooning vehicles
EP3757587B1 (en) Flexible test board to improve sensor i/o coverage for autonomous driving platform
US20230305138A1 (en) Communication method and apparatus
CN208596231U (zh) 一种车载通讯终端
EP4047909A1 (en) Data transmission apparatus and data transmission system
WO2020133098A1 (zh) 一种分布式计算网络系统与方法
CN111077841A (zh) 一种基于双can总线的无人机飞行控制系统
US11589236B2 (en) Detecting misbehavior conditions in vehicle-to-everything (V2X) messages
US20220360538A1 (en) Method and apparatus for processing sensor data, computing device and storage medium
CN209928279U (zh) 智能驾驶系统及智能车辆
CN115348657B (zh) 用于车辆时间同步的系统、方法及车辆
CN112896240B (zh) 基于边缘计算的多传感器列车定位方法
US20240069217A1 (en) Vehicle-mounted controller and method for issuing absolute time of vehicle and vehicle
US20220375276A1 (en) Processing system, processing method, and computer readable medium storing processing program
US20230153324A1 (en) Service discovery method and apparatus, computing device, and storage medium
WO2022127337A1 (zh) 主时钟装置、从时钟装置和时间同步方法
CN115882989A (zh) 一种时钟同步的方法、装置和车辆

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19953177

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022529367

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2019953177

Country of ref document: EP

Effective date: 20220513

NENP Non-entry into the national phase

Ref country code: DE