CN109141389B - Electric compass signal analog generator - Google Patents

Electric compass signal analog generator Download PDF

Info

Publication number
CN109141389B
CN109141389B CN201811099656.8A CN201811099656A CN109141389B CN 109141389 B CN109141389 B CN 109141389B CN 201811099656 A CN201811099656 A CN 201811099656A CN 109141389 B CN109141389 B CN 109141389B
Authority
CN
China
Prior art keywords
pin
signal
control unit
resistor
amplifier
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201811099656.8A
Other languages
Chinese (zh)
Other versions
CN109141389A (en
Inventor
牛军浩
李玉虎
戴冰
苏金操
王文胜
骆薇羽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guilin University of Electronic Technology
Original Assignee
Guilin University of Electronic Technology
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 Guilin University of Electronic Technology filed Critical Guilin University of Electronic Technology
Priority to CN201811099656.8A priority Critical patent/CN109141389B/en
Publication of CN109141389A publication Critical patent/CN109141389A/en
Application granted granted Critical
Publication of CN109141389B publication Critical patent/CN109141389B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C17/00Compasses; Devices for ascertaining true or magnetic north for navigation or surveying purposes
    • G01C17/02Magnetic compasses
    • G01C17/28Electromagnetic compasses
    • G01C17/32Electron compasses
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/21Pc I-O input output
    • G05B2219/21014Interface, module with relays
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/21Pc I-O input output
    • G05B2219/21137Analog to digital conversion, ADC, DAC

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Automation & Control Theory (AREA)
  • Electromagnetism (AREA)
  • Navigation (AREA)
  • Arrangements For Transmission Of Measured Signals (AREA)

Abstract

The invention relates to an electric compass signal analog generator, which solves the technical problem that when the signal of a hand-operated type synchro is zero-crossing, the output signal waveform is not proportional to a reference fundamental wave signal but is a signal frequency signal, and the generator comprises a computer control unit, a lower computer main control unit and four paths of digital-to-analog conversion units connected with the lower computer main control unit, wherein each path of digital-to-analog conversion units are sequentially connected with a signal amplification circuit and an output interface; the output interface is of a Y-shaped structure; the computer control unit transmits the user input parameters to the lower computer main control unit; the digital-to-analog conversion unit converts the digital signals sent by the main control unit into analog signals; the output voltage Vpp of the signal amplification circuit is 160V +/-10%, the carrier signal frequency is 100HZ +/-10%, and the envelope signal frequency range is 1Hz +/-10% -30HZ +/-10%, so that the technical scheme can be used for well solving the problem and can be used in the production and maintenance process of ships.

Description

Electric compass signal analog generator
Technical Field
The invention relates to the field of automatic control, in particular to an electric compass signal analog generator.
Background
At present, China is a marine kingdom, a shipbuilding kingdom and is advancing to the marine kingdom, the shipbuilding kingdom, and an electric compass is indispensable equipment on a ship as equipment for providing course. In the production and maintenance process of ships, an electric compass signal simulation generator is needed to help debug the equipment needing to receive electric compass signals on the ships, so that the working efficiency can be greatly improved. Meanwhile, the singlechip technology is rapidly developed, the precision is higher and higher, the speed is higher and higher, the singlechip technology is applied to various fields, intelligent equipment is the research direction at present, and the control of the computer on the output signal of the compass signal simulation generator is realized by combining with computer control software.
The prior art adopts a hand-operated self-angle machine and a mode of realizing signal output by taking a single chip microcomputer and a DSC module as cores. The hand-operated synchro-generator works in a complex environment for a long time, when a three-phase signal output by the mode passes through zero, the waveform of the output signal is not proportional to a reference fundamental wave signal but is a signal-frequency signal, so that at the working point, when the synchro-generator simulating the course is not moved, the course angle of the signal receiving device is continuously increased or decreased, and the synchro-generator is not suitable to serve as an electric compass signal simulation generator. Simultaneously, this equipment is intelligent low, and hand formula can not accurate control angular velocity, and the rotation angle produces great error and inconvenient easily. The single chip microcomputer and the DSC module are cores, the method for realizing signal output only outputs three paths of signals, fundamental wave signals are lacked, and in addition, the voltage of an output signal of the method is not yet Vpp 160V.
In order to solve the above technical problems, the present invention provides an analog generator for an electrical compass signal.
Disclosure of Invention
The invention aims to solve the technical problem that in the prior art, when a hand-operated type selsyn signal passes through zero, the output signal waveform is not proportional to a reference fundamental wave signal any more, but is a signal-frequency signal. The novel electric compass signal simulation generator has the characteristics of safety, stability, simplicity in operation, portability and high man-machine interaction.
In order to solve the technical problems, the technical scheme is as follows:
the compass signal simulation generator comprises a computer control unit, a lower computer main control unit connected with the computer control unit, and four paths of digital-to-analog conversion units connected with the lower computer main control unit, wherein each path of digital-to-analog conversion unit is sequentially connected with a signal amplification circuit and an output interface.
The computer control unit transmits the user input parameters to the lower computer main control unit; the digital-to-analog conversion unit is used for converting the digital signals sent by the main control unit into analog signals; the output voltage Vpp of the signal amplification circuit is 160V +/-10%, the carrier signal frequency is 100HZ +/-10%, the envelope signal frequency range is 1Hz +/-10% -30HZ +/-10%, and the forward and reverse rotation directions can be selected.
The working principle of the invention is as follows: the computer control unit sends the signal parameters input by the user to the lower computer main control unit in a communication protocol mode, the lower computer main control unit analyzes the received parameter data packet to generate four paths of digital signals and sends the digital signals to the DAC, analog signals with weak signals are generated, meanwhile, in order to improve the anti-interference capacity of the signals, the signals are amplified to Vpp of 160V +/-10%, and then the signals are respectively output to the outside, and high-voltage anti-interference signal output is achieved.
In the above scheme, for optimization, further, the compass signal analog generator further includes a power module for supplying power with voltages of 3.3V, ± 15V and ± 110V; the power module comprises a self-recovery fuse combination, a transient suppression diode combination and a voltage dependent resistor value combination for lightning protection.
Furthermore, the signal amplification circuit comprises an amplifier U11 pin 3 connected with the output of the digital-to-analog conversion unit, the pin 1, the pin 5 and the pin 8 of the amplifier U11 are suspended, the pin 2 of the amplifier U11 is connected with a resistor R38 and a resistor R39, the other end of the resistor R38 is grounded, the other end of the resistor R39 is connected with the pin 6 of the amplifier U11, the pin 6 of the amplifier U11 is also connected with a resistor R46 and an OUT end, the pin 4 of the amplifier U11 is connected with the resistor R53 and the pin 6 of the amplifier U14, and the pin 7 of the amplifier U11 is connected with the pin 6 of the amplifier U8;
the 1 st pin, the 8 th pin and the 5 th pin of the amplifier U14 are suspended, the 7 th pin is grounded, the 4 th pin is connected with a voltage ranging from-85V to-110V, the 2 nd pin is connected to the other end of the resistor R53, the 3 rd pin is connected with the resistor R59 and the resistor R50, the other end of the resistor R59 is grounded, and the other end of the resistor R50 is connected with the OUT end;
the 6 th pin of the amplifier U8 is also connected with a resistor R22, the 1 st pin, the 5 th pin and the 8 th pin of the amplifier U8 are suspended, the 4 th pin is grounded, the 7 th pin is connected with a voltage of + 85V- +110V, the 2 nd pin is connected with the other end of the resistor R22, the 3 rd pin is connected with the other end of the resistor R46 and is also connected with a resistor R34, and the other end of the resistor R34 is connected with a voltage of + 85V- + 110V.
Further, a signal communication circuit is connected between the computer control unit and the lower computer main control unit, and the signal communication circuit is used for converting the differential signal output by the computer into a TTL level signal.
Further, in the data transmitted by the signal communication circuit, the data sequentially includes a frame header 0xAA, an 8-bit angular velocity, a 16-bit rotation angle, a 16-bit amplitude, an 8-bit direction, and a frame tail 0x 55;
the method comprises the steps that a 0xAA frame header represents a control instruction, 8-bit angular speed is used for setting a rotation angular speed, 16-bit rotation angular speed is used for setting a rotation angle, 16-bit amplitude is used for setting output voltage of an electric compass signal simulation generator, 8-bit direction is used for setting a rotation direction, and a frame tail is used for representing a control instruction and ending.
Further, the lower computer main control unit stores an initialization program, a signal receiving program, a signal analyzing program, a digital signal generating program, and an SPI transmission program, and is configured to execute the following steps:
step 1, initializing a lower computer main control unit, wherein the lower computer main control unit comprises a GPIO interface, an SPI bus, a USART serial port and timer interrupt initialization;
and step 2, controlling the serial port of the electronic compass signal simulation unit to sequentially perform serial port receiving terminal, control command analysis, serial port exit interruption and timer interruption, and generating signals.
The digital signal generating program adopts a timing output mode, the carrier signal frequency is 100HZ sine wave, each period is 10ms, each period samples 100 points, namely, each two points has a time interval of 100us, data is transmitted every 100us, the data step length is
Figure BDA0001806350690000041
The frequency range of the envelope signal is 1Hz +/-10% -30HZ +/-10%, data is transmitted every 100us fixedly, the frequency is Fre, and the number of sampling points in each period is Fre
Figure BDA0001806350690000042
Step size of
Figure BDA0001806350690000043
The forward rotation is one plus this step and the reverse is one minus this step. The end of the envelope signal represents the end of the current Rotation signal, the Rotation angle determines the number of sampling points, the sampling times of the envelope signal is count, the Rotation angle is Rotation _ angle, the angular velocity, namely the frequency of the envelope signal is Fre, and then
Figure BDA0001806350690000044
Namely, count _ angle × N.
And 3, transmitting the digital signal to the digital-to-analog conversion unit by using the SPI bus.
The invention has the beneficial effects that: the invention changes the output interface according to the delta-Y conversion, the used Y-shaped structure is simpler and more stable, and the working frequency is doubled at the same time. By selecting the running speed of the STMF4 series controller, the functions are integrated, and the advantages are achieved in the aspect of working stability. The algorithm of timing output is adopted, the frequency, the rotation angular velocity and the angular velocity of the signal can be accurately generated, the output of the control signal is carried out through a computer, the rotation angle can be displayed in real time, and the method is convenient to use in ship production and maintenance.
Drawings
The invention is further illustrated with reference to the following figures and examples.
Fig. 1 is a schematic diagram of an analog generator of an electrical compass signal in embodiment 1.
Fig. 2 is a schematic diagram of a main control unit circuit.
Fig. 3, a schematic diagram of a power module.
Fig. 4 is a schematic diagram of a digital-to-analog conversion unit circuit structure.
Fig. 5 is a timing diagram of the digital-to-analog conversion unit.
Fig. 6, a schematic diagram of a signal amplification circuit.
Fig. 7, a schematic diagram of a signal communication circuit.
Fig. 8 is a schematic view of a conventional external interface.
Fig. 9 is a schematic view of the external interface of the present embodiment.
Fig. 10 is a control schematic diagram of the electric compass program unit.
Fig. 11 is a software flow diagram of the electric compass program unit.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Example 1
In this embodiment, as shown in fig. 1, the electrical compass signal analog generator includes a computer control unit, a lower computer main control unit connected to the computer control unit, and four digital-to-analog conversion units connected to the lower computer main control unit, where each digital-to-analog conversion unit is sequentially connected to a signal amplification circuit and an output interface.
As shown in fig. 9, the output interface is a Y-type structure, and includes a C1C2 serial branch interface, a P1 interface, a P2 interface, and a P3 interface that are connected in parallel; the C1C2 serial branch interface, the P1 interface, the P2 interface and the P3 interface are all referenced to the ground; the computer control unit is used for sending input parameters to the lower computer main control unit in a mode specified by a communication protocol; the output voltage of the signal amplification circuit is 160V. Compared with the existing output interface shown in fig. 8, the Y-type interface structure adopted in the embodiment is simpler and more stable, and the working frequency is doubled at the same time.
As shown in FIG. 8, when the excitation winding of the compass signal simulation unit is excited, the excitation voltage U is generatedC1C2Simulation from compass signals when (t) is Asin (2 pi ft)The cell output voltage is:
Figure BDA0001806350690000061
Figure BDA0001806350690000062
Figure BDA0001806350690000063
when the course rotates for one degree every time, the whole angle machine rotates for 360 degrees, and then the relation between the course change angle and the phase angle of the output voltage is as follows:
Figure BDA0001806350690000064
Δθnavigation deviceIs the course change angle;
Figure BDA0001806350690000065
is the initial phase.
Where Δ θNavigation device=ωt1ω is several degrees per second, ω > 0 when heading is clockwise, ω < 0 when heading is reverse, ω is 0 when heading is stopped, t is 01To start timing when started.
Then there are:
Figure BDA0001806350690000066
Figure BDA0001806350690000067
Figure BDA0001806350690000068
as the Y-type interface of fig. 9, it is:
UC1C2(t)=Asin(2πft)
UP1(t)=Psin(2πωt10)sin(2πft),
Figure BDA0001806350690000069
Figure BDA00018063506900000610
and (3) calculating:
Figure BDA0001806350690000071
Figure BDA0001806350690000072
Figure BDA0001806350690000073
two cases were compared, with:
Figure BDA0001806350690000074
Figure BDA0001806350690000075
since the effective values of P1 and P2 are 110V + -10%,
Figure BDA0001806350690000076
the course mainly uses phase discrimination, has low requirement on amplitude, is combined with convenient selection of devices, and takes P as 80V, and the corresponding amplitude requirement is as follows: the amplitude of the P1, P2, P3 pairs to center ground is Vpp 160V ± 10%.
The frequency of the compass signal simulation unit is power frequency, the ship application is 400Hz, the frequency is 100Hz, and the deviation is +/-5%.
To calibrate for easy signal capture, α is0Defined as 0, the four signals of the embodiment are output as follows:
UC1C2(t)=Psin(2πft)
UP1(t)=Psin(2πωt1)sin(2πft),
Figure BDA0001806350690000077
Figure BDA0001806350690000078
wherein: p is 80 ± 10%, f is 100Hz ± 5%.
The lower computer main control unit of the embodiment determines the speed of program operation, the signal output precision and the stability of the signal generator operation. The main control chip selects STM32F427, and Cortex-M4 of the STM32F427 comprises a 32-bit microcontroller core and a floating point arithmetic unit. The bandwidth of a CPU and a DMA controller can be improved by the multi-layer AHB bus matrix, the self-adaptive real-time accelerator realizes a zero waiting state of code execution from a flash memory, the performance of Cortex-M4 is as high as 210DMIPS (566CoreMark) at 168MHz, which is the highest performance of a Cortex-M4 core at 168MHz, and a circuit diagram of a main control circuit is shown in figure 2.
In order to improve the power supply stability, preferably, the compass signal analog generator of the present embodiment further includes a power module for supplying power with voltages of 3.3V, ± 15V and ± 110V; the power module comprises a self-recovery fuse combination, a transient suppression diode combination and a piezoresistor value combination for lightning protection, and the circuit diagram of the power module is shown in figure 3.
The digital-to-analog conversion unit of this embodiment determines the speed of digital-to-analog conversion and the accuracy of output. The present embodiment selects to use a DAC714 sixteen-bit high-speed converter, which is a complete single-chip digital-to-analog converter, including a +10V temperature compensation reference voltage source, a current-voltage amplifier, a high-speed synchronous serial interface, allowing the serial output and asynchronous zero clearing functions of the cascade multiplexer to immediately set the output voltage to an intermediate level. When the power supply works under a power supply of +/-12V or +/-15V, the output voltage range is +/-10V, +/-5V or 0-10V, and the digital-to-analog conversion output rule is shown in table 1.
TABLE 1
Digital signal input Analog signal output Unit of
7FFF +10 V
4000 +5 V
0001 0.000305 V
0000 0 V
FFFF -0.000305 V
C000 -5 V
8000 -10 V
The STM32F427 is in communication connection with the DAC through the SPI bus, and is effective when A0 is low and A1 is high, and the DAC adopts a +/-15V double-power supply for power supply in a timing diagram shown in figure 5. The power supply voltage is preferably not lower than +/-12V, and the output waveform is possibly distorted; not higher than 17V, otherwise the DAC714 chip may burn out.
The DAC714 has an error due to the influence of the operating temperature, the ambient temperature, the signal frequency, and the like, in this embodiment, the precision adjustable resistor R6 is used to fine tune the signal amplification factor, and if the output signal is shifted, the precision adjustable resistor R7 is used to adjust the shift, so that the signal is symmetrical with respect to the zero voltage.
Specifically, the signal amplification circuit of this embodiment is as shown in fig. 6, and includes an amplifier U11 pin 3 connected to the output of the digital-to-analog conversion unit, a pin 1, a pin 5, and a pin 8 of the amplifier U11 are floating, a pin 2 of the amplifier U11 is connected to a resistor R38 and a resistor R39, the other end of the resistor R38 is grounded, the other end of the resistor R39 is connected to a pin 6 of the amplifier U11, the pin 6 of the amplifier U11 is further connected to a resistor R46 and an OUT terminal, a pin 4 of the amplifier U11 is connected to a pin 6 of the resistor R53 and the amplifier U14, and a pin 7 of the amplifier U11 is connected to a pin 6 of the amplifier U8;
the 1 st pin, the 8 th pin and the 5 th pin of the amplifier U14 are suspended, the 7 th pin is grounded, the 4 th pin is connected with a voltage ranging from-85V to-110V, the 2 nd pin is connected to the other end of the resistor R53, the 3 rd pin is connected with the resistor R59 and the resistor R50, the other end of the resistor R59 is grounded, and the other end of the resistor R50 is connected with the OUT end;
the 6 th pin of the amplifier U8 is also connected with a resistor R22, the 1 st pin, the 5 th pin and the 8 th pin of the amplifier U8 are suspended, the 4 th pin is grounded, the 7 th pin is connected with a voltage of + 85V- +110V, the 2 nd pin is connected with the other end of the resistor R22, the 3 rd pin is connected with the other end of the resistor R46 and is also connected with a resistor R34, and the other end of the resistor R34 is connected with a voltage of + 85V- + 110V.
In the embodiment which needs to amplify signals and generates signals with Vpp of 160V at most in practical operation, the OPA454 is used as a power amplifier, and the OPA454 device is a low-cost operational amplifier with high voltage of 100V and relatively high current driving of 50 mA. The OPA454 unity gain is stable and has a gain-bandwidth product of 2.5 MHz. The OPA454 is internally over-temperature protected and current overload protected. The OPA454 operates in a wide power supply voltage range of ± 5V to ± 50V, or in a single power supply voltage range of 10V to 100V.
As shown in FIG. 6, the signal amplification circuit is composed of three OPAs 454 with amplification factor
Figure BDA0001806350690000101
The standard supply voltage of the present embodiment, i.e., + -100V, may not be lower than + -85V, otherwise the output signal Vpp requirement may not be satisfied, and may not be higher than + -110V, otherwise the circuit may be burned. The output signal of U8 is used as the positive pole of the power supply of U11, the output of U14 is used as the negative pole of the power supply of U8, thus the output signal of U8 can meet the Vpp maximum 160V requirement, the embodiment only explains the amplifying circuit of OUT1, and the circuit diagrams of OUT2, OUT3 and OUT4 are the same as those of OUT1
Specifically, as shown in fig. 7, a signal communication circuit is connected between the electric compass program unit and the main control unit, and the signal communication circuit is used for converting signals of the electric compass program unit into TTL level signals. Signals sent by the electric compass program unit need to be converted into TTL levels which can be accepted by STM32, the embodiment selects PL2303 as a conversion chip, and the PL2303 is internally provided with a USB function controller, a USB transceiver, an oscillator and a UART with all modem control signals, so that the electric compass program unit can be conveniently embedded into various devices. In the embodiment, a computer and a lower computer are connected through a USB connecting line with one square port, the computer sends differential signals to DM and DP of PL2303, the internal level of the DM and DP is converted into 3.3VTTL level, STM32F427 always detects whether signals are sent, and if the sending signals are received, USART interruption is carried out, and a control instruction is analyzed.
Regarding the data communication protocol transmitted by the signal communication circuit, the data sequentially comprises a frame header 0xAA, an 8-bit angular velocity, a 16-bit rotation angle, a 16-bit amplitude, an 8-bit direction and a frame tail 0x 55;
the method comprises the steps that a 0xAA frame header represents a control instruction, 8-bit angular speed is used for setting a rotation angular speed, 16-bit rotation angular speed is used for setting a rotation angle, 16-bit amplitude is used for setting output voltage of an electric compass signal simulation generator, 8-bit direction is used for setting a rotation direction, and a frame tail is used for representing a control instruction and ending.
When the device of this embodiment is used, as shown in fig. 10, after the computer control unit is opened, a correct communication port is selected, the parameters of the computer control unit are input, the "set" button is clicked, if no parameter is set, the parameter setting is continuously waited, if the setting is completed, the "forward rotation or reverse rotation" is clicked, at this time, whether the input parameters meet the specification or not is performed by the program first, if the parameters meet the specification, an instruction is sent to the electronic compass signal simulation generator, and if the parameters do not meet the specification, a prompt box is popped up to guide the correct input parameters to wait for resetting.
Further, the lower computer master control unit stores therein an initialization program, a signal receiving program, a signal analyzing program, and an output digital signal generating program, and the SPI transmission program is configured to execute the steps shown in fig. 11:
step 1, initializing a lower computer main control unit, wherein the lower computer main control unit comprises a GPIO interface, an SPI bus, a USART serial port and timer interrupt initialization;
and 2, the lower computer main control unit sequentially performs serial port receiving terminal, control instruction analysis, serial port exit interruption and timer interruption to generate signals.
The digital signal generating program adopts a timing output mode, a carrier signal frequency is 100HZ sine wave, each period is 10ms, each period samples 100 points, namely, each two points have a time interval of 100us, data is transmitted every 100us, and the data step length is
Figure BDA0001806350690000111
The frequency range of the envelope signal is 1-30HZ +/-10%, data is transmitted every 100us fixedly, the frequency is Fre, and the number of sampling points in each period is Fre
Figure BDA0001806350690000112
Step size of
Figure BDA0001806350690000113
The forward rotation is one plus this step and the reverse is one minus this step. The end of the envelope signal represents the end of the current Rotation signal, the Rotation angle determines the number of sampling points, the sampling times of the envelope signal is count, the Rotation angle is Rotation _ angle, the angular velocity, namely the frequency of the envelope signal is Fre, and then
Figure BDA0001806350690000114
Namely, count _ angle × N
And 3, transmitting a signal to the digital-to-analog conversion unit by using the SPI bus.
After the electric compass signal analog generator is powered on, firstly some initialization programs are completed, mainly including GPIO interface, SPI bus, USART serial port and timer interrupt initialization, in order to ensure that said generator can retain quick operation speed and stability, and considering DAC714 working performance, SPI data transmission speed is set to 5MHZ, timer is set to 100US interrupt once, baud rate of serial port is set to 115200, serial port interrupt priority is highest and timer priority is second, after said series of initialization is completed, timer is interrupted, SPI can be used for transmitting and outputting four-channel 100Hz sine signal, at the same time, it can wait for that there is control instruction sent by computer control unit, if it receives control instruction, it can be used for interruption, analyzing out control instruction, quit USART interruption, and can be used for timer interruption again to generate signal conforming to control instruction, i.e. it can complete one-time instruction receiving, Analyzing, generating signals, and then continuing to wait for command sending, so that the control command generation signals can be sent for multiple times in a loop.
Although the illustrative embodiments of the present invention have been described above to enable those skilled in the art to understand the present invention, the present invention is not limited to the scope of the embodiments, and it is apparent to those skilled in the art that all the inventive concepts using the present invention are protected as long as they can be changed within the spirit and scope of the present invention as defined and defined by the appended claims.

Claims (8)

1. An analog generator of electrical compass signals, comprising: the compass signal simulation generator comprises a computer control unit, a lower computer main control unit connected with the computer control unit, and four paths of digital-to-analog conversion units connected with the lower computer main control unit, wherein each path of digital-to-analog conversion unit is sequentially connected with a signal amplification circuit and an output interface;
the output interface is of a Y-shaped structure and comprises a C1C2 serial branch interface, a P1 interface, a P2 interface and a P3 interface which are connected in parallel; the C1C2 serial branch interface, the P1 interface, the P2 interface and the P3 interface are all referenced to the ground;
the computer control unit transmits the user input parameters to the lower computer main control unit according to a communication protocol mode;
the output voltage Vpp of the signal amplification circuit is 160V +/-10%, the carrier signal frequency is 100HZ +/-10%, and the envelope signal frequency range is 1Hz +/-10% -30HZ +/-10%.
2. The analog generator of electrical compass signals according to claim 1, wherein: the electric compass signal analog generator also comprises a power supply module for supplying power with 3.3V, 15V and 110V voltages;
the power module comprises a self-recovery fuse combination, a transient suppression diode combination and a voltage dependent resistor value combination for lightning protection.
3. The analog generator of electrical compass signals according to claim 2, wherein: the signal amplification circuit comprises an amplifier U11 pin 3 connected with the output of the digital-to-analog conversion unit, a pin 1, a pin 5 and a pin 8 of the amplifier U11 are suspended, a pin 2 of the amplifier U11 is connected with a resistor R38 and a resistor R39, the other end of the resistor R38 is grounded, the other end of the resistor R39 is connected with a pin 6 of the amplifier U11, the pin 6 of the amplifier U11 is also connected with a resistor R46 and an OUT end, a pin 4 of the amplifier U11 is connected with a resistor R53 and the pin 6 of the amplifier U14, and a pin 7 of the amplifier U11 is connected with a pin 6 of the amplifier U8;
the 1 st pin, the 8 th pin and the 5 th pin of the amplifier U14 are suspended, the 7 th pin is grounded, the 4 th pin is connected with a voltage ranging from-85V to-110V, the 2 nd pin is connected to the other end of the resistor R53, the 3 rd pin is connected with the resistor R59 and the resistor R50, the other end of the resistor R59 is grounded, and the other end of the resistor R50 is connected with the OUT end;
the 6 th pin of the amplifier U8 is also connected with a resistor R22, the 1 st pin, the 5 th pin and the 8 th pin of the amplifier U8 are suspended, the 4 th pin is grounded, the 7 th pin is connected with a voltage of + 85V- +110V, the 2 nd pin is connected with the other end of the resistor R22, the 3 rd pin is connected with the other end of the resistor R46 and is also connected with a resistor R34, and the other end of the resistor R34 is connected with a voltage of + 85V- + 110V.
4. The analog generator of electrical compass signals according to claim 1, wherein: and a signal communication circuit is connected between the computer control unit and the lower computer main control unit and is used for converting the differential signal output by the computer into a TTL level signal.
5. The analog generator of electrical compass signals according to claim 4, wherein: in the data transmitted by the signal communication circuit, the data sequentially comprises a frame header 0xAA, an 8-bit angular velocity, a 16-bit rotation angle, a 16-bit amplitude, an 8-bit direction and a frame tail 0x 55;
the method comprises the steps that a 0xAA frame header represents a control instruction, 8-bit angular speed is used for setting a rotation angular speed, 16-bit rotation angular speed is used for setting a rotation angle, 16-bit amplitude is used for setting output voltage of an electric compass signal simulation generator, 8-bit direction is used for setting a rotation direction, and a frame tail is used for representing a control instruction and ending.
6. The analog generator of electrical compass signals according to claim 1, wherein: the computer control unit transmits the parameter signal to the lower computer master control unit in the manner of the communication protocol in claim 5.
7. The analog generator of electrical compass signals according to claim 1, wherein: the lower computer main control unit internally stores an initialization program, a signal receiving program, a signal analysis program, a digital signal generation program and an SPI transmission program and is used for executing the following steps:
step 1, initializing a lower computer main control unit, wherein the lower computer main control unit comprises a GPIO interface, an SPI bus, a USART serial port and timer interrupt initialization;
step 2, controlling the serial port of the electronic compass signal simulation unit to sequentially perform serial port receiving terminal, control command analysis, serial port exit interruption and timer interruption to generate signals;
and 3, transmitting a signal to the digital-to-analog conversion unit by using the SPI bus.
8. The analog generator of electrical compass signals according to claim 7, wherein: the digital signal generation program adopts a timing output mode, the carrier signal frequency is 100HZ sine wave, and the data step length is
Figure FDA0002782906490000031
Defining the envelope frequency to be Fre and the step size to be
Figure FDA0002782906490000032
The sampling times of the envelope signal are count, the Rotation angle is Rotation _ angle, and the envelope signal is calculated
Figure FDA0002782906490000033
count=Rotation_angle×N。
CN201811099656.8A 2018-09-20 2018-09-20 Electric compass signal analog generator Active CN109141389B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811099656.8A CN109141389B (en) 2018-09-20 2018-09-20 Electric compass signal analog generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811099656.8A CN109141389B (en) 2018-09-20 2018-09-20 Electric compass signal analog generator

Publications (2)

Publication Number Publication Date
CN109141389A CN109141389A (en) 2019-01-04
CN109141389B true CN109141389B (en) 2021-03-26

Family

ID=64815280

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811099656.8A Active CN109141389B (en) 2018-09-20 2018-09-20 Electric compass signal analog generator

Country Status (1)

Country Link
CN (1) CN109141389B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115371656B (en) * 2022-08-26 2024-05-10 中船重工重庆长平机械有限责任公司 High-speed course digital converter

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1123277A (en) * 1997-06-30 1999-01-29 Yokogawa Denshi Kiki Kk Gyro compass
JP2001349957A (en) * 2001-03-12 2001-12-21 Techno Togo:Kk Terrestrial magnetism azimuth measuring device and azimuth measuring method
CN1338848A (en) * 2000-08-10 2002-03-06 皇家菲利浦电子有限公司 Activating inspection for star node connected with plural network nodes
CN201497895U (en) * 2009-08-14 2010-06-02 东莞市新雷神仿真控制有限公司 8-Channel analog data control box
CN202050382U (en) * 2011-04-01 2011-11-23 河南省电力公司洛阳供电公司 Electronic type transfer switch for transformer
CN102744987A (en) * 2011-04-22 2012-10-24 深圳市大族激光科技股份有限公司 DA (Analog to Digital) conversion device and DA conversion method for marking machine
CN202661074U (en) * 2012-01-16 2013-01-09 山东交通学院 Digital converter of analog signal gyrocompass
CN104101338A (en) * 2014-06-20 2014-10-15 广州航新航空科技股份有限公司 Wireless composite compass simulating method and device based on PXI synthetic instrument
CN104375446A (en) * 2014-11-27 2015-02-25 哈尔滨金都太阳能科技有限公司 Platform compass simulator based on single chip microcomputer
CN104793205A (en) * 2015-04-24 2015-07-22 芜湖航飞科技股份有限公司 Navigation radar
CN105203089A (en) * 2015-09-30 2015-12-30 中国人民解放军海军工程大学 Selsyn solid-state axial angle sending system
CN205263781U (en) * 2014-11-07 2016-05-25 速博思股份有限公司 Mutual capacitance embedded touch display panel device with high sensing sensitivity
CN206989962U (en) * 2017-08-16 2018-02-09 中船重工重庆长平机械有限责任公司 A kind of analog-to-digital circuit and the gyro compass comprising the circuit

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1123277A (en) * 1997-06-30 1999-01-29 Yokogawa Denshi Kiki Kk Gyro compass
CN1338848A (en) * 2000-08-10 2002-03-06 皇家菲利浦电子有限公司 Activating inspection for star node connected with plural network nodes
JP2001349957A (en) * 2001-03-12 2001-12-21 Techno Togo:Kk Terrestrial magnetism azimuth measuring device and azimuth measuring method
CN201497895U (en) * 2009-08-14 2010-06-02 东莞市新雷神仿真控制有限公司 8-Channel analog data control box
CN202050382U (en) * 2011-04-01 2011-11-23 河南省电力公司洛阳供电公司 Electronic type transfer switch for transformer
CN102744987A (en) * 2011-04-22 2012-10-24 深圳市大族激光科技股份有限公司 DA (Analog to Digital) conversion device and DA conversion method for marking machine
CN202661074U (en) * 2012-01-16 2013-01-09 山东交通学院 Digital converter of analog signal gyrocompass
CN104101338A (en) * 2014-06-20 2014-10-15 广州航新航空科技股份有限公司 Wireless composite compass simulating method and device based on PXI synthetic instrument
CN205263781U (en) * 2014-11-07 2016-05-25 速博思股份有限公司 Mutual capacitance embedded touch display panel device with high sensing sensitivity
CN104375446A (en) * 2014-11-27 2015-02-25 哈尔滨金都太阳能科技有限公司 Platform compass simulator based on single chip microcomputer
CN104793205A (en) * 2015-04-24 2015-07-22 芜湖航飞科技股份有限公司 Navigation radar
CN105203089A (en) * 2015-09-30 2015-12-30 中国人民解放军海军工程大学 Selsyn solid-state axial angle sending system
CN206989962U (en) * 2017-08-16 2018-02-09 中船重工重庆长平机械有限责任公司 A kind of analog-to-digital circuit and the gyro compass comprising the circuit

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"3D interactive simulation of arma-brown gyrocompass based on VRML";Wu jianhua et al.;《2010 International Conference on Mechanic Automation and Control Engineering》;20101231;第1-5页 *
"基于单片机技术的数字电罗经系统";李众 等;《华东船舶工业学院学报》;20001031;第14卷(第5期);第27-31页 *

Also Published As

Publication number Publication date
CN109141389A (en) 2019-01-04

Similar Documents

Publication Publication Date Title
CN103984830B (en) A kind of emulation mode of optical fibre gyro digital newspaper industry logic
CN101729002A (en) SOPC-based remote monitoring system of no-position sensor brushless DC motor
CN109141389B (en) Electric compass signal analog generator
CN101729005A (en) Method for controlling brushless DC motor based on FPGA
CN101729013A (en) IP core of position sensor-free and brushless direct-current motor
CN204330001U (en) A kind of angle to digital conversion Module Automatic Test System based on LAN (Local Area Network)
CN108983640A (en) A kind of electric linear steering gear control system and method based on LabVIEW
CN203422097U (en) Multifunctional networking digital shaft angle converter
CN110514912A (en) A kind of secondary voltage kernel phase system
CN203299274U (en) High tension switchgear phase measurement circuit
CN208109153U (en) A kind of optical electric axial angle encoder detector
CN105242062B (en) Fan rotation-speed detection device
CN204515006U (en) A kind of eight railway digital System of voltage acquisitions
CN110825005A (en) STM32 and LWIP-based data acquisition system
CN203149428U (en) Three-phase program-control accurate test power supply
CN208569350U (en) A kind of the digital power control device and system of x-ray source
CN207123738U (en) A kind of arbitrarily signal generating device based on terminal fitting
CN203489914U (en) A wind-driven generator parameter integrated monitoring apparatus based on a STD bus
Ruifeng et al. Stepper Motor Control Based on AT89S51 Microcontroller
CN208622301U (en) Signal processing and display system
CN210015441U (en) Parallel heterogeneous simulation platform suitable for ADPSS double-fed fan closed-loop test
CN109030947B (en) Method for calculating equivalent impedance of electronic load simulation direct current motor
CN203672963U (en) Digital voltmeter based on singlechip
CN206610140U (en) A kind of monitoring system of wind power plant
Li et al. Design of flight data signal generator system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20190104

Assignee: Guangxi Baise Chenhai Technology Co.,Ltd.

Assignor: GUILIN University OF ELECTRONIC TECHNOLOGY

Contract record no.: X2023980044733

Denomination of invention: A Kind of Gyrocompass Signal Simulation Generator

Granted publication date: 20210326

License type: Common License

Record date: 20231030

EE01 Entry into force of recordation of patent licensing contract