CN113630108B - Triangular wave signal parameter measurement circuit - Google Patents
Triangular wave signal parameter measurement circuit Download PDFInfo
- Publication number
- CN113630108B CN113630108B CN202111096854.0A CN202111096854A CN113630108B CN 113630108 B CN113630108 B CN 113630108B CN 202111096854 A CN202111096854 A CN 202111096854A CN 113630108 B CN113630108 B CN 113630108B
- Authority
- CN
- China
- Prior art keywords
- circuit
- triangular wave
- comparator
- capture
- time
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03K—PULSE TECHNIQUE
- H03K5/00—Manipulating of pulses not covered by one of the other main groups of this subclass
- H03K5/125—Discriminating pulses
Abstract
The invention discloses a triangular wave signal parameter measuring circuit, which comprises a voltage reference V ref1 And V ref2 A circuit, a comparison circuit and a capture circuit; the voltage reference V ref1 And V ref2 A circuit is provided with a plurality of circuits,the comparison circuit is used for generating a voltage reference with high precision and high stability and realizing a triangular wave signal v to be detected tri (t) and V ref1 And V ref2 Comparing to obtain PWM signalsAndthe capture circuit is toAndthe invention is respectively connected to Capture ports of a control chip, namely, the Capture port 1 and the Capture port 2.
Description
Technical Field
The invention relates to the field of signal measurement, in particular to a triangular wave signal parameter measuring circuit.
Background
The triangular wave signal is widely applied to instruments and meters, digital audio systems, power electronics, radars, communication and other occasions, plays an important role in signal modulation application, and the performance of the triangular wave signal is a key index of a modulator.
The main parameter indexes of the triangular wave signal comprise amplitude, period, symmetry and the like. Where symmetry refers to the percentage of time that the triangular wave rise time occupies in the entire signal period. The existing triangular wave signal generation has three types: the first is to adopt discrete components to generate a mode based on waveform transformation, namely, triangular waves are generated by charging and discharging rectangular waves; the second is based on DDS technology mode, namely direct frequency synthesis mode generation; the third is based on a program control mode, namely, a step signal is generated through the DA of the control chip, and then a high-frequency signal is filtered to obtain a triangular wave. In any implementation manner, in order to obtain a high-precision triangular wave, the triangular wave generator must be closed-loop controlled, and then the parameter value of the output triangular wave must be obtained in real time. However, the existing acquisition of the triangular wave parameter value either adopts a complex hardware circuit or requires a complex software algorithm, and the complexity and cost of the triangular wave generator are increased.
Disclosure of Invention
The invention aims to provide a triangular wave signal parameter measuring circuit. The invention has the characteristics of simple hardware structure, low cost and strong anti-interference capability.
The technical scheme of the invention is as follows: a triangular wave signal parameter measurement circuit is characterized in that: comprising a voltage reference V ref1 And V ref2 A circuit, a comparison circuit and a capture circuit;
the voltage reference V ref1 And V ref2 Circuit for generating a voltage reference with high precision and high stability, and satisfying V min <V ref2 <V ref1 <V max (ii) a Wherein: v min 、V max Are respectively triangular wave signals v tri (t) minimum and maximum values;
the comparison circuit realizes the triangular wave signal v to be detected tri (t) and V ref1 And V ref2 Comparing to obtain PWM signalsAndwherein: v. of tri (t) is connected to the non-inverting input of the comparator 1, V ref1 Is connected with the inverting input end of the comparator 1; v. of tri (t) is connected to the non-inverting input of the comparator 2, V ref2 Is connected with the inverting input end of the comparator 2; the output terminal of the comparator 1 isThe output terminal of the comparator 2 is
The capture circuit is toAndcapture ports Capture1 and Capture2 respectively connected to the control chip respectively acquireOn-time ofOn-time ofRising edge andtime interval T between rising edges 2 、Falling edge andtime interval T between falling edges 5 ;
According to the obtainedT 2 And T 5 And V given above ref1 And V ref2 To give v tri Minimum value V of (t) min Maximum value V max Period T, rise period time T up And a falling phase time T down 。
Compared with the prior art, the method has the following advantages:
(1) the invention reduces the cost of the circuit through a simple hardware structure;
(2) the system structure is relatively simple, and the realization difficulty is low;
(3) the parameters are calculated by adopting a time capturing method, so that the method has high precision and strong anti-interference capability.
Drawings
FIG. 1 is a schematic diagram of a triangular wave signal parameter measurement;
FIG. 2 is a schematic diagram of a circuit for measuring parameters of triangular wave signals;
FIG. 3 is a flow chart of a time capture algorithm;
fig. 4 is a flowchart of the triangular wave parameter calculation.
Detailed Description
The invention is further illustrated by the following figures and examples, which are not to be construed as limiting the invention.
Examples are given. A triangular wave signal parameter measuring circuit mainly applies the geometric relationship of triangular waves, and the relationship is shown in figure 1. The variables are described as follows: v ref1 And V ref2 Respectively comparing voltage reference values; v min And V max Are respectively triangular wave signals v tri Minimum and maximum values of (t), V dc Is v is tri Peak to peak value of (t), i.e. V dc =V max -V min ;T up Is v is tri (t) rise phase time; t is a unit of down Is v is tri (t) a fall phase time; t is v tri (t) a period satisfying: t = T up +T down ;Is v is tri (t) and a reference value V ref1 The logic relationship of the PWM signals obtained after comparison is as follows:is v is tri (t) and a reference value V ref2 The logic relationship of the PWM signals obtained after comparison is as follows:is composed ofOn-time of (d);is composed ofOn-time of (d); t is a unit of 2 Is composed ofRising edge andthe time interval between rising edges; t is 5 Is composed ofFalling edge andthe time interval between falling edges. From the geometry of fig. 1, it can be seen that:
the simultaneous (2) and (3) can obtain:
obtaining T by the capturing unit 2 And T 5 On the basis of (a), calculating λ:
combining (4), (5) and (6), and finishing to obtain T 3 And T 4 Comprises the following steps:
further, from (2), it is possible to obtain:
therefore:
due to the fact thatT 2 、T 5 Can be acquired by a capture unit, V ref1 、V ref2 Setting a reference value for the circuit, the value being known, so V max Can be calculated by the formula (9).
And because:
due to the following:
T up +T down =T (12)
and because of the triangular wave v tri (T) period T andare identical and thus can be captured byI.e. the period T may be obtained by the capturing unit. Therefore:
in combination of (5) and (13), the following results are obtained:
due to T, T 2 、T 5 Can be acquired by the capturing unit, so T can be calculated up 、T down 。
And because:
therefore, the simultaneous (14) and (16) can obtain:
the triangular wave v can be solved by the formula (17) tri Peak of (t)Peak value V dc 。
Because:
V dc =V max -V min (18)
simultaneous (9), (18) to obtain:
the triangular wave v can be obtained by solving (9), (17) and (19) tri Maximum value V of (t) max Peak to peak value V dc And a minimum value V min By capture ofCan obtain a triangular wave v tri The period T of (T), the triangular wave v can be obtained from (14) and (15) tri (T) rise time T up And a fall time T down The triangular wave v can be obtained by the above formula tri (t) related parameters.
The schematic diagram of the triangular wave signal parameter measuring circuit is shown in FIG. 2, and mainly comprises a linear voltage stabilizing circuit and a voltage reference V ref1 And V ref2 Circuit, comparison circuit 1, comparison circuit 2 and MUC circuit. The linear voltage stabilizing circuit mainly realizes the input voltage V in Performing voltage stabilization to obtain output voltage V meeting the requirement o (ii) a Voltage reference V ref1 And V ref2 The circuit can be generated by a precise voltage chip and a precise voltage division circuit. The embodiment of the invention provides a method for realizing a reference V by adopting a commonly used precision voltage stabilization chip TL431 ref1 And V ref2 Generation of (1); in the circuit, R1 is used for adjusting the current flowing through the TL431, so that the TL431 works in a reasonable working range and the precision of the TL431 is ensured; r2, R3 and R4 form a precise voltage division circuit by using high-precision resistors to realize a reference V ref And V ref2 Generation of (1); the capacitors C1 and C2 play an anti-interference role and stabilize the reference voltage V ref1 And V ref2 (ii) a Non-inverting input terminal v of comparator 1 tri (t), the inverting input terminal V ref1 The output end is a signalNon-inverting input terminal v of comparator 2 tri (t), the inverting input terminal V ref2 The output end is a signalThe MCU has two roles: 1. two capturing ports of Capture1 and Capture2 are respectively connectedAndfor obtainingAnda time parameter of (d); 2. in obtainingAndafter the time parameter is obtained, the measuring algorithm provided by the invention is executed to obtain the triangular wave v tri (t) related parameters.
FIG. 3 is a flow chart of a time capture algorithm, comprising:
(1) The initialization module is used for initializing the Capture1 and Capture2 modules;
(2) Starting a Capture1 module and a Capture2 module;
(3) Does Capture2 determine if a rising edge occurs? If yes, entering the step (4); otherwise, waiting;
(4) Starting a timer, and entering the step (5);
(5) Does Capture1 appear rising edge? If yes, entering the step (6); otherwise, waiting;
(6) Saving the current value of the timer to T 2 Entering the step (7);
(7) Is it judged whether a falling edge occurred in Capture 1? If yes, entering the step (8); otherwise, waiting;
(9) Is it judged whether a falling edge occurred in Capture 2? If yes, entering the step (10); otherwise, waiting;
(11) Does Capture2 determine if a rising edge occurs? If yes, entering the step (12); otherwise, waiting;
(12) Saving the current value of the timer to T, clearing the current value of the timer and stopping the timer, and entering the step (13);
(13) Enabling the software to interrupt, and returning to the step (4);
fig. 4 is a flowchart of the triangular wave parameter calculation, including:
(1) Entering a software interrupt program, and entering the step (2);
(7) Exiting the software interrupt program;
the examples should not be construed as limiting the present invention and any modifications made based on the spirit of the present invention should be covered within the scope of the present invention.
Claims (1)
1. A triangular wave signal parameter measurement circuit is characterized in that: including a voltage referenceAnda circuit, a comparison circuit and a capture circuit;
the voltage referenceAndcircuit for generating a voltage reference with high precision and high stability, and satisfying(ii) a Wherein:、are respectively triangular wave signalsMinimum and maximum values of;
the comparison circuit realizes the triangular wave signal to be detectedAndandcomparing to obtain PWM signalsAnd(ii) a Wherein:is connected with the non-inverting input end of the comparator 1,is connected with the inverting input end of the comparator 1;is connected with the non-inverting input end of the comparator 2,is connected with the inverting input end of the comparator 2; the output terminal of the comparator 1 isThe output terminal of the comparator 2 is;
The capture circuit is toAndcapture ports Capture1 and Capture2 respectively connected to the control chip respectively acquireOn-time ofOn-time of、Rising edge andtime interval between rising edges、Falling edge andtime interval between falling edges;
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111096854.0A CN113630108B (en) | 2021-09-18 | 2021-09-18 | Triangular wave signal parameter measurement circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111096854.0A CN113630108B (en) | 2021-09-18 | 2021-09-18 | Triangular wave signal parameter measurement circuit |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113630108A CN113630108A (en) | 2021-11-09 |
CN113630108B true CN113630108B (en) | 2023-02-07 |
Family
ID=78390458
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111096854.0A Active CN113630108B (en) | 2021-09-18 | 2021-09-18 | Triangular wave signal parameter measurement circuit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113630108B (en) |
Family Cites Families (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3236071B2 (en) * | 1992-06-05 | 2001-12-04 | キヤノン株式会社 | Triangular wave signal generation circuit |
GB9400078D0 (en) * | 1994-01-05 | 1994-03-02 | Smiths Industries Plc | Ramp generator |
US7746130B2 (en) * | 2008-07-14 | 2010-06-29 | Elite Semiconductor Memory Technology, Inc. | Triangular wave generating circuit having synchronization with external clock |
CN101425795B (en) * | 2008-11-20 | 2010-12-08 | 四川和芯微电子股份有限公司 | Accurate saw-tooth wave generating circuit |
KR101412807B1 (en) * | 2012-11-13 | 2014-06-27 | 삼성전기주식회사 | Triangular waveform generating apparatus |
CN103944540A (en) * | 2014-05-08 | 2014-07-23 | 成都雷电微力科技有限公司 | Triangular wave signal generator |
CN106569032B (en) * | 2016-10-17 | 2019-05-31 | 长沙开元仪器股份有限公司 | A kind of detection method of signal frequency and duty ratio based on embedded microcontroller |
CN106788347B (en) * | 2017-01-12 | 2024-02-02 | 中国计量大学 | Triangular wave generation device and adjustment method |
US10498316B2 (en) * | 2018-01-17 | 2019-12-03 | Stmicroelectronics S.R.L. | Auto-tuned ramp generator |
CN109669070A (en) * | 2019-01-02 | 2019-04-23 | 中电和瑞科技有限公司 | A kind of frequency measurement method and frequency measurement circuit |
CN109752584B (en) * | 2019-01-14 | 2020-10-09 | 彭志辉 | Method for measuring effective value of periodic signal |
US20210028774A1 (en) * | 2019-07-28 | 2021-01-28 | Ali W. Daher | Analog function generator with digital instrumentation methods for output signal |
CN113009854B (en) * | 2019-12-19 | 2023-03-31 | 江森自控空调冷冻设备(无锡)有限公司 | Device for obtaining effective value of analog input signal |
-
2021
- 2021-09-18 CN CN202111096854.0A patent/CN113630108B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN113630108A (en) | 2021-11-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102594118B (en) | Boost PFC controller | |
CN110798212B (en) | Time domain interleaved waveform synthesis timing mismatch calibration device and method | |
CN103856062A (en) | Double-loop control circuit of phase-shifted full-bridge synchronous rectification circuit | |
US11275397B2 (en) | Power factor correction circuit, control method and controller | |
CN107782972B (en) | Power grid impedance measurement method based on variable PWM carrier frequency | |
US11621628B2 (en) | Predictive active filter for EMI attenuation | |
CN113630108B (en) | Triangular wave signal parameter measurement circuit | |
CN102594135B (en) | Boost PFC controller | |
CN112803717A (en) | SHEPWM control system and method for controlling output voltage of high-power converter | |
CN211086468U (en) | L CR tester | |
Nayak et al. | Performance analysis of different control strategies in a z-source inverter | |
CN207283432U (en) | A kind of inverter control circuit and its method for operation of the output of perseverance pulsewidth | |
EP4106167A1 (en) | Control circuit and ac-dc power supply applying the same | |
CN113783552B (en) | Triangular wave signal generating system | |
CN102684495A (en) | Digital power supply control circuit, control method and digital power supply using circuit and method | |
CN113300587B (en) | Pulse sequence control method and device for power factor correction converter | |
CN113804936B (en) | Triangular wave signal parameter measurement method | |
US10910952B1 (en) | Control apparatus and method for current resonance circuit and current resonance power supply | |
CN103023291A (en) | Resonance suppression method based on voltage-type grid-connected inverter | |
CN111550913B (en) | Phase locking device and air conditioner | |
CN110943607B (en) | Single-cycle three-phase six-switch power factor correction PWM modulator | |
CN216312956U (en) | Frequency modulation circuit for closed-loop control of switching power supply | |
Huang | A new method of generate the PWM wave using analog circuits | |
CN114389439A (en) | Ramp injection circuit and error compensation method thereof in switching power supply | |
Li et al. | A Multi-Frequency Model for Buck Converter |
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 |