CN113630108B - Triangular wave signal parameter measurement circuit - Google Patents

Triangular wave signal parameter measurement circuit Download PDF

Info

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
Application number
CN202111096854.0A
Other languages
Chinese (zh)
Other versions
CN113630108A (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.)
Wenzhou University
Original Assignee
Wenzhou University
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 Wenzhou University filed Critical Wenzhou University
Priority to CN202111096854.0A priority Critical patent/CN113630108B/en
Publication of CN113630108A publication Critical patent/CN113630108A/en
Application granted granted Critical
Publication of CN113630108B publication Critical patent/CN113630108B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K5/00Manipulating of pulses not covered by one of the other main groups of this subclass
    • H03K5/125Discriminating 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 signals
Figure DDA0003269186430000011
And
Figure DDA0003269186430000012
the capture circuit is to
Figure DDA0003269186430000013
And
Figure DDA0003269186430000014
the invention is respectively connected to Capture ports of a control chip, namely, the Capture port 1 and the Capture port 2.

Description

Triangular wave signal parameter measurement circuit
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 signals
Figure BDA0003269186410000021
And
Figure BDA0003269186410000022
wherein: 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 is
Figure BDA0003269186410000023
The output terminal of the comparator 2 is
Figure BDA0003269186410000024
The capture circuit is to
Figure BDA0003269186410000025
And
Figure BDA0003269186410000026
capture ports Capture1 and Capture2 respectively connected to the control chip respectively acquire
Figure BDA0003269186410000027
On-time of
Figure BDA0003269186410000028
On-time of
Figure BDA0003269186410000029
Rising edge and
Figure BDA00032691864100000210
time interval T between rising edges 2
Figure BDA00032691864100000211
Falling edge and
Figure BDA00032691864100000212
time interval T between falling edges 5
According to the obtained
Figure BDA00032691864100000213
T 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
Figure BDA0003269186410000031
Is v is tri (t) and a reference value V ref1 The logic relationship of the PWM signals obtained after comparison is as follows:
Figure BDA0003269186410000032
is v is tri (t) and a reference value V ref2 The logic relationship of the PWM signals obtained after comparison is as follows:
Figure BDA0003269186410000033
is composed of
Figure BDA0003269186410000034
On-time of (d);
Figure BDA0003269186410000035
is composed of
Figure BDA0003269186410000036
On-time of (d); t is a unit of 2 Is composed of
Figure BDA0003269186410000037
Rising edge and
Figure BDA0003269186410000038
the time interval between rising edges; t is 5 Is composed of
Figure BDA0003269186410000039
Falling edge and
Figure BDA00032691864100000310
the time interval between falling edges. From the geometry of fig. 1, it can be seen that:
Figure BDA00032691864100000311
Figure BDA00032691864100000312
Figure BDA00032691864100000313
the simultaneous (2) and (3) can obtain:
Figure BDA00032691864100000314
obtaining T by the capturing unit 2 And T 5 On the basis of (a), calculating λ:
Figure BDA0003269186410000041
and obtained by the capture unit
Figure BDA0003269186410000042
On the basis of (A), and comprises:
Figure BDA0003269186410000043
combining (4), (5) and (6), and finishing to obtain T 3 And T 4 Comprises the following steps:
Figure BDA0003269186410000044
further, from (2), it is possible to obtain:
Figure BDA0003269186410000045
therefore:
Figure BDA0003269186410000046
due to the fact that
Figure BDA0003269186410000047
T 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:
Figure BDA0003269186410000048
because:
Figure BDA0003269186410000049
therefore:
Figure BDA00032691864100000410
due to the following:
T up +T down =T (12)
and because of the triangular wave v tri (T) period T and
Figure BDA00032691864100000411
are identical and thus can be captured by
Figure BDA0003269186410000051
I.e. the period T may be obtained by the capturing unit. Therefore:
Figure BDA0003269186410000052
in combination of (5) and (13), the following results are obtained:
Figure BDA0003269186410000053
Figure BDA0003269186410000054
due to T, T 2 、T 5 Can be acquired by the capturing unit, so T can be calculated up 、T down
And because:
Figure BDA0003269186410000055
therefore, the simultaneous (14) and (16) can obtain:
Figure BDA0003269186410000056
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:
Figure BDA0003269186410000057
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 of
Figure BDA0003269186410000058
Can 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 signal
Figure BDA0003269186410000061
Non-inverting input terminal v of comparator 2 tri (t), the inverting input terminal V ref2 The output end is a signal
Figure BDA0003269186410000062
The MCU has two roles: 1. two capturing ports of Capture1 and Capture2 are respectively connected
Figure BDA0003269186410000063
And
Figure BDA0003269186410000064
for obtaining
Figure BDA0003269186410000065
And
Figure BDA0003269186410000066
a time parameter of (d); 2. in obtaining
Figure BDA0003269186410000067
And
Figure BDA0003269186410000068
after 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;
(8) The current value of the timer minus T 2 And the result is saved to
Figure BDA0003269186410000071
Entering the step (9);
(9) Is it judged whether a falling edge occurred in Capture 2? If yes, entering the step (10); otherwise, waiting;
(10) Current value of timer minus T 2 And
Figure BDA0003269186410000072
result is saved to T 5 Entering the step (11);
(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);
(2) Obtaining T, T 2 、T 5
Figure BDA0003269186410000073
And V ref1 、V ref2 Entering the step (3);
(3) Computing
Figure BDA0003269186410000074
Entering the step (4);
(4) Calculating out
Figure BDA0003269186410000075
Entering the step (5);
(5) Computing
Figure BDA0003269186410000076
Entering the step (6);
(6) Computing
Figure BDA0003269186410000077
Entering the step (7);
(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 reference
Figure DEST_PATH_IMAGE002
And
Figure DEST_PATH_IMAGE004
a circuit, a comparison circuit and a capture circuit;
the voltage reference
Figure 485974DEST_PATH_IMAGE002
And
Figure 668693DEST_PATH_IMAGE004
circuit for generating a voltage reference with high precision and high stability, and satisfying
Figure DEST_PATH_IMAGE006
(ii) a Wherein:
Figure DEST_PATH_IMAGE008
Figure DEST_PATH_IMAGE010
are respectively triangular wave signals
Figure DEST_PATH_IMAGE012
Minimum and maximum values of;
the comparison circuit realizes the triangular wave signal to be detected
Figure DEST_PATH_IMAGE013
And
Figure DEST_PATH_IMAGE014
and
Figure 792638DEST_PATH_IMAGE004
comparing to obtain PWM signals
Figure DEST_PATH_IMAGE016
And
Figure DEST_PATH_IMAGE018
(ii) a Wherein:
Figure DEST_PATH_IMAGE019
is connected with the non-inverting input end of the comparator 1,
Figure 328793DEST_PATH_IMAGE014
is connected with the inverting input end of the comparator 1;
Figure DEST_PATH_IMAGE020
is connected with the non-inverting input end of the comparator 2,
Figure 877586DEST_PATH_IMAGE004
is connected with the inverting input end of the comparator 2; the output terminal of the comparator 1 is
Figure DEST_PATH_IMAGE021
The output terminal of the comparator 2 is
Figure 369223DEST_PATH_IMAGE018
The capture circuit is to
Figure 901835DEST_PATH_IMAGE021
And
Figure 303998DEST_PATH_IMAGE018
capture ports Capture1 and Capture2 respectively connected to the control chip respectively acquire
Figure 441718DEST_PATH_IMAGE016
On-time of
Figure DEST_PATH_IMAGE023
On-time of
Figure DEST_PATH_IMAGE025
Figure 638344DEST_PATH_IMAGE021
Rising edge and
Figure 861515DEST_PATH_IMAGE018
time interval between rising edges
Figure DEST_PATH_IMAGE027
Figure 536210DEST_PATH_IMAGE016
Falling edge and
Figure 528437DEST_PATH_IMAGE018
time interval between falling edges
Figure DEST_PATH_IMAGE029
According to the obtained
Figure 630385DEST_PATH_IMAGE023
Figure 606431DEST_PATH_IMAGE025
Figure DEST_PATH_IMAGE030
And
Figure 819238DEST_PATH_IMAGE029
and the foregoing
Figure 931550DEST_PATH_IMAGE014
And
Figure 935891DEST_PATH_IMAGE004
to obtain
Figure DEST_PATH_IMAGE031
Minimum value of (2)
Figure DEST_PATH_IMAGE032
Maximum value of
Figure DEST_PATH_IMAGE033
Period T, rise phase time
Figure DEST_PATH_IMAGE035
And time of descent phase
Figure DEST_PATH_IMAGE037
(ii) a Wherein
Figure DEST_PATH_IMAGE039
Figure DEST_PATH_IMAGE041
Figure DEST_PATH_IMAGE043
Figure DEST_PATH_IMAGE045
And
Figure DEST_PATH_IMAGE047
CN202111096854.0A 2021-09-18 2021-09-18 Triangular wave signal parameter measurement circuit Active CN113630108B (en)

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)

* Cited by examiner, † Cited by third party
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

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