CN114598304A - PWM signal generation method and device - Google Patents
PWM signal generation method and device Download PDFInfo
- Publication number
- CN114598304A CN114598304A CN202210299890.5A CN202210299890A CN114598304A CN 114598304 A CN114598304 A CN 114598304A CN 202210299890 A CN202210299890 A CN 202210299890A CN 114598304 A CN114598304 A CN 114598304A
- Authority
- CN
- China
- Prior art keywords
- count value
- signal
- clock signal
- pwm signal
- clock
- 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.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03K—PULSE TECHNIQUE
- H03K7/00—Modulating pulses with a continuously-variable modulating signal
- H03K7/08—Duration or width modulation ; Duty cycle modulation
Landscapes
- Dc-Dc Converters (AREA)
Abstract
Description
技术领域technical field
本发明涉及电力电子技术领域,特别涉及一种PWM信号生成方法及装置。The present invention relates to the technical field of power electronics, and in particular, to a method and device for generating a PWM signal.
背景技术Background technique
在电力电子领域的部分应用场景中,对电力电子开关器件要求给定高精度的PWM信号,以对电力电子开关器件实现更为精准的动作控制,具体要求PWM信号的分辨率能够达到200ps左右。PWM信号的表现为高低电平的持续时间,通过对调节高低电平的持续时间,即可实现电力电子开关器件通断时间的控制,因此,PWM信号电平宽度的调节分辨率必然是越精细越容易实现精细的输出调节。In some application scenarios in the field of power electronics, a high-precision PWM signal is required for power electronic switching devices to achieve more precise motion control for power electronic switching devices. Specifically, the resolution of the PWM signal is required to reach about 200ps. The performance of the PWM signal is the duration of the high and low levels. By adjusting the duration of the high and low levels, the on-off time of the power electronic switching device can be controlled. Therefore, the adjustment resolution of the PWM signal level width must be finer. Easier to achieve fine output adjustment.
对于基于FPGA(Field Programmable Gate Array,可编程逻辑器件)实现的PWM信号生成方法而言,大都是通过对FPGA内部的时钟装置输出的时钟信号进行计数实现的,而时钟信号的信号周期是固定的,在此基础上对时钟信号计数,信号周期与计数值的乘积就是相应的时间,进而通过调节所需的时钟信号的计数值即可实现对PWM信号高低电平持续时间的控制,也就是说,该技术能够实现PWM信号的最小调节分辨率,即脉冲宽度的最小调节量,对应于时钟信号的信号周期。For the PWM signal generation method based on FPGA (Field Programmable Gate Array, programmable logic device), it is mostly realized by counting the clock signal output by the clock device inside the FPGA, and the signal period of the clock signal is fixed. , on this basis, the clock signal is counted, and the product of the signal period and the count value is the corresponding time, and then the control of the high and low level duration of the PWM signal can be realized by adjusting the required count value of the clock signal, that is to say , this technology can realize the minimum adjustment resolution of the PWM signal, that is, the minimum adjustment amount of the pulse width, which corresponds to the signal period of the clock signal.
然而,在现有技术中,时钟信号的时钟周期基本是固定的,最小为10ns或者5ns,导致PWM信号宽度调节的最小分辨率为5ns,难以实现高精度PWM信号的输出,无法满足实际应用需求。However, in the prior art, the clock period of the clock signal is basically fixed, with a minimum of 10ns or 5ns, resulting in a minimum resolution of 5ns for the width adjustment of the PWM signal, which makes it difficult to output high-precision PWM signals and cannot meet practical application requirements. .
发明内容SUMMARY OF THE INVENTION
本发明提供一种PWM信号生成方法及装置,对时钟信号的相位进行调节,进而实现在相同计数值情况下对电平持续时间进行更精细的调节,实现高精度PWM信号的输出,满足实际应用需求。The invention provides a method and device for generating a PWM signal, which can adjust the phase of a clock signal, thereby realizing more fine adjustment of the level duration under the same count value, realizing the output of a high-precision PWM signal, and satisfying practical applications. need.
为实现上述目的,本申请提供的技术方案如下:To achieve the above purpose, the technical solutions provided by the application are as follows:
本申请一方面提供一种PWM信号生成方法,,包括:One aspect of the present application provides a method for generating a PWM signal, including:
控制时钟装置输出第一时钟信号和第二时钟信号;controlling the clock device to output the first clock signal and the second clock signal;
按照预设计数方式分别对所述第一时钟信号和所述第二时钟信号进行计数;respectively counting the first clock signal and the second clock signal according to a preset counting manner;
在计数过程中控制相位调节装置按预设相位差调节所述第二时钟信号的相位;Controlling the phase adjusting device to adjust the phase of the second clock signal according to a preset phase difference during the counting process;
其中,所述预设相位差小于所述第二时钟信号的时钟周期;Wherein, the preset phase difference is less than the clock period of the second clock signal;
根据所述第二时钟信号的计数值,或者,所述第一时钟信号和所述第二时钟信号的计数值控制信号生成装置输出当前周期的PWM信号。According to the count value of the second clock signal, or the count value of the first clock signal and the second clock signal, the signal generating means is controlled to output the PWM signal of the current cycle.
可选的,所述在计数过程中控制相位调节装置按预设相位差调节所述第二时钟信号的相位,包括:Optionally, the controlling the phase adjustment device to adjust the phase of the second clock signal according to a preset phase difference during the counting process includes:
在所述第二时钟信号的计数值小于预设半周期计数值的情况下,控制相位调节装置按照第一预设相位差调节所述第二时钟信号的相位;In the case that the count value of the second clock signal is smaller than the preset half-cycle count value, controlling the phase adjustment device to adjust the phase of the second clock signal according to the first preset phase difference;
其中,所述预设半周期计数值基于PWM信号的占空比设置。Wherein, the preset half-cycle count value is set based on the duty cycle of the PWM signal.
可选的,根据所述第一时钟信号和所述第二时钟信号的计数值控制信号生成装置输出当前周期的PWM信号的过程,包括:Optionally, the process of controlling the signal generating device to output the PWM signal of the current cycle according to the count value of the first clock signal and the second clock signal includes:
根据所述第二时钟信号的计数值控制信号生成装置进行当前周期的PWM信号的电平切换;Control the signal generating device to perform level switching of the PWM signal of the current cycle according to the count value of the second clock signal;
根据所述第一时钟信号的计数值控制所述信号生成装置停止当前周期的PWM信号的输出。The signal generating means is controlled to stop the output of the PWM signal of the current cycle according to the count value of the first clock signal.
可选的,所述根据所述第二时钟信号的计数值控制信号生成装置进行当前周期的PWM信号的电平切换,包括:Optionally, the control of the signal generation device to perform level switching of the PWM signal of the current cycle according to the count value of the second clock signal includes:
在所述第二时钟信号的计数值达到所述预设半周期计数值之前,控制信号生成装置输出当前周期的PWM信号的第一电平;Before the count value of the second clock signal reaches the preset half-cycle count value, the control signal generating device outputs the first level of the PWM signal of the current cycle;
在所述第二时钟信号的计数值达到所述预设半周期计数值时,控制所述信号生成装置将所述第一电平切换为当前周期的PWM信号的第二电平;When the count value of the second clock signal reaches the preset half-cycle count value, controlling the signal generating device to switch the first level to the second level of the PWM signal of the current cycle;
在所述第二时钟信号的计数值大于等于所述预设半周期计数值,且所述第一时钟信号的计数值小于预设全周期计数值的情况下,控制所述信号生成装置维持输出所述第二电平。When the count value of the second clock signal is greater than or equal to the preset half-cycle count value, and the count value of the first clock signal is less than the preset full-cycle count value, control the signal generating device to maintain the output the second level.
可选的,所述根据所述第一时钟信号的计数值控制所述信号生成装置停止当前周期的PWM信号的输出,包括:Optionally, the controlling the signal generating device to stop the output of the PWM signal of the current cycle according to the count value of the first clock signal includes:
在所述第一时钟信号的计数值达到预设全周期计数值时,控制所述信号生成装置停止输出所述第二电平。When the count value of the first clock signal reaches a preset full cycle count value, the signal generating device is controlled to stop outputting the second level.
可选的,还包括:在所述第一时钟信号的计数值等于所述预设全周期计数值时,将所述第一时钟信号的计数值和所述第二时钟信号的计数值清零。Optionally, it also includes: when the count value of the first clock signal is equal to the preset full cycle count value, clearing the count value of the first clock signal and the count value of the second clock signal to zero .
可选的,所述在计数过程中控制相位调节装置按预设相位差调节所述第二时钟信号的相位,包括:Optionally, the controlling the phase adjustment device to adjust the phase of the second clock signal according to a preset phase difference during the counting process includes:
在所述第二时钟信号的计数值大于等于预设半周期计数值且小于预设全周期计数值的情况下,控制相位调节装置按照第二预设相位差调节所述第二时钟信号的相位。When the count value of the second clock signal is greater than or equal to a preset half-cycle count value and less than a preset full-cycle count value, control the phase adjustment device to adjust the phase of the second clock signal according to the second preset phase difference .
可选的,根据所述第二时钟信号的计数值输出当前周期的PWM信号的过程,包括:Optionally, the process of outputting the PWM signal of the current cycle according to the count value of the second clock signal includes:
根据所述第二时钟信号的计数值控制信号生成装置进行当前周期的PWM信号的电平切换;Control the signal generating device to perform level switching of the PWM signal of the current cycle according to the count value of the second clock signal;
根据所述第二时钟信号的计数值控制所述信号生成装置停止当前周期的PWM信号的输出。The signal generating means is controlled to stop the output of the PWM signal of the current cycle according to the count value of the second clock signal.
可选的,所述根据所述第二时钟信号的计数值控制信号生成装置进行当前周期的PWM信号的电平切换,包括:Optionally, the control of the signal generation device to perform level switching of the PWM signal of the current cycle according to the count value of the second clock signal includes:
在所述第二时钟信号的计数值达到所述预设半周期计数值之前,控制信号生成装置输出当前周期的PWM信号的第一电平;Before the count value of the second clock signal reaches the preset half-cycle count value, the control signal generating device outputs the first level of the PWM signal of the current cycle;
在所述第二时钟信号的计数值等于所述预设半周期计数值时,控制所述信号生成装置将所述第一电平切换为当前周期的PWM信号的第二电平;When the count value of the second clock signal is equal to the preset half-cycle count value, controlling the signal generating device to switch the first level to the second level of the PWM signal of the current cycle;
在所述第二时钟信号的计数值大于等于所述预设半周期计数值且小于预设全周期计数值的情况下,控制所述信号生成装置维持输出所述第二电平。When the count value of the second clock signal is greater than or equal to the preset half-cycle count value and less than a preset full-cycle count value, the signal generating device is controlled to maintain outputting the second level.
可选的,所述根据所述第二时钟信号的计数值控制所述信号生成装置停止当前周期的PWM信号的输出,包括:Optionally, the controlling the signal generating device to stop the output of the PWM signal of the current cycle according to the count value of the second clock signal includes:
在所述第二时钟信号的计数值达到所述预设全周期计数值的情况下,控制所述信号生成装置停止输出所述第二电平。When the count value of the second clock signal reaches the preset full cycle count value, the signal generating device is controlled to stop outputting the second level.
可选的,还包括:在所述第二时钟信号的计数值达到所述预设全周期计数值的情况下,将所述第二时钟信号的计数值清零。Optionally, the method further includes: when the count value of the second clock signal reaches the preset full cycle count value, clearing the count value of the second clock signal to zero.
可选的,在控制信号生成装置输出当前周期的PWM信号的第一电平的过程中,控制所述相位调节装置按照第三预设相位差调节所述第二时钟信号的相位。Optionally, in the process of controlling the signal generating device to output the first level of the PWM signal of the current cycle, the phase adjusting device is controlled to adjust the phase of the second clock signal according to a third preset phase difference.
可选的,所述预设计数方式包括递增计数、递减计数、增减计数以及减增计数中的一种。Optionally, the preset counting manner includes one of counting up, counting down, counting up and down, and counting down.
本申请第二方面提供一种PWM信号生成装置,包括:时钟装置、相位调节装置、信号生成装置以及主控制器,其中,A second aspect of the present application provides a PWM signal generation device, including: a clock device, a phase adjustment device, a signal generation device, and a main controller, wherein,
所述时钟装置的第一输出端与所述信号生成装置相连;The first output end of the clock device is connected to the signal generating device;
所述时钟装置的第二输出端经所述相位调节装置与所述信号生成装置相连;The second output end of the clock device is connected to the signal generating device via the phase adjusting device;
所述主控制器分别与所述时钟装置、所述相位调节装置以及所述信号生成装置相连;The main controller is respectively connected with the clock device, the phase adjustment device and the signal generation device;
所述主控制器执行如本申请上一方面任一项所述的PWM信号生成方法。The main controller executes the PWM signal generation method according to any one of the above aspects of the present application.
本发明提供的PWM信号生成方法,首先控制时钟装置输出第一时钟信号和第二时钟信号,然后按照预设计数方式分别对第一时钟信号和第二时钟信号进行计数;并在计数过程中控制相位调节装置按预设相位差调节第二时钟信号的相位;最后根据第二时钟信号的计数值,或者,第一时钟信号和第二时钟信号的计数值控制信号生成装置输出当前周期的PWM信号。由于第二时钟信号的相位发生变化,导致在采用相同计数值的情况下,对应的信号宽度发生变化,进一步由于预设相位差小于时钟周期,信号宽度的变化会相应的小于时钟周期,即实现了分辨率小于时钟周期、精度更高的PWM信号,进而满足实际应用需求。The PWM signal generation method provided by the present invention firstly controls the clock device to output the first clock signal and the second clock signal, and then counts the first clock signal and the second clock signal respectively according to a preset counting method; The phase adjusting device adjusts the phase of the second clock signal according to the preset phase difference; finally, according to the count value of the second clock signal, or the count value of the first clock signal and the second clock signal, the signal generating device is controlled to output the PWM signal of the current cycle . Because the phase of the second clock signal changes, the corresponding signal width changes when the same count value is used. Furthermore, since the preset phase difference is smaller than the clock period, the change in the signal width will be correspondingly smaller than the clock period, that is, the realization of A PWM signal with a resolution smaller than the clock period and a higher precision is obtained to meet practical application requirements.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术内的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述内的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the accompanying drawings that are used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative effort.
图1是本发明实施例提供的一种PWM信号生成方法的流程图;1 is a flowchart of a method for generating a PWM signal provided by an embodiment of the present invention;
图2a-图2d是本发明实施例提供的第1种PWM信号生成过程的波形示意图;2a-2d are schematic waveform diagrams of a first PWM signal generation process provided by an embodiment of the present invention;
图3a-图3d是本发明实施例提供的第2种PWM信号生成过程的波形示意图;3a-3d are schematic waveform diagrams of a second PWM signal generation process provided by an embodiment of the present invention;
图4a-图4d是本发明实施例提供的第3种PWM信号生成过程的波形示意图;4a-4d are schematic waveform diagrams of a third PWM signal generation process provided by an embodiment of the present invention;
图5a-图5d是本发明实施例提供的第4种PWM信号生成过程的波形示意图;5a-5d are schematic waveform diagrams of a fourth PWM signal generation process provided by an embodiment of the present invention;
图6a-图6d是本发明实施例提供的第5种PWM信号生成过程的波形示意图;6a-6d are schematic waveform diagrams of a fifth PWM signal generation process provided by an embodiment of the present invention;
图7a-图7d是本发明实施例提供的第6种PWM信号生成过程的波形示意图;7a-7d are schematic waveform diagrams of a sixth PWM signal generation process provided by an embodiment of the present invention;
图8a-图8d是本发明实施例提供的第7种PWM信号生成过程的波形示意图;8a-8d are schematic waveform diagrams of a seventh PWM signal generation process provided by an embodiment of the present invention;
图9a-图9d是本发明实施例提供的第8种PWM信号生成过程的波形示意图;9a-9d are schematic waveform diagrams of an eighth PWM signal generation process provided by an embodiment of the present invention;
图10a-图10d是本发明实施例提供的第9种PWM信号生成过程的波形示意图;10a-10d are schematic waveform diagrams of a ninth PWM signal generation process provided by an embodiment of the present invention;
图11a-图11d是本发明实施例提供的第10种PWM信号生成过程的波形示意图;11a-11d are schematic waveform diagrams of a tenth PWM signal generation process provided by an embodiment of the present invention;
图12a-图12d是本发明实施例提供的第11种PWM信号生成过程的波形示意图;12a-12d are schematic waveform diagrams of an eleventh PWM signal generation process provided by an embodiment of the present invention;
图13a-图13d是本发明实施例提供的第12种PWM信号生成过程的波形示意图;13a-13d are schematic waveform diagrams of a twelfth PWM signal generation process provided by an embodiment of the present invention;
图14是本发明实施例提供的一种PWM信号生成装置的结构示意图。FIG. 14 is a schematic structural diagram of an apparatus for generating a PWM signal according to an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
本发明提供的PWM信号生成方法,应用于电子设备,在基于FPGA实现PWM信号生成装置的情况下,具体可以应用于该信号生成装置的主控制器之中,当然,在实际应用中,还可以应用于其他能够对PWM生成过程进行控制的控制器。参见图1,图1是本发明实施例提供的一种PWM信号生成方法的流程图,本实施例提供的PWM信号生成方法的流程,可以包括:The PWM signal generation method provided by the present invention is applied to electronic equipment. In the case of implementing a PWM signal generation device based on FPGA, it can be specifically applied to the main controller of the signal generation device. Of course, in practical applications, it can also be Applied to other controllers capable of controlling the PWM generation process. Referring to FIG. 1, FIG. 1 is a flowchart of a method for generating a PWM signal provided by an embodiment of the present invention. The flowchart of the method for generating a PWM signal provided by this embodiment may include:
S100、控制时钟装置输出第一时钟信号和第二时钟信号。S100. Control the clock device to output the first clock signal and the second clock signal.
在现有应用中,时钟装置能够按照预设的信号周期输出时钟信号,通过对时钟信号的计数就可以确定相应的时长。本发明实施例提供的PWM信号生成方法,控制时钟装置输出第一时钟信号和第二时钟信号,在实际应用中,为了简化后续步骤的计数过程,第一时钟信号和第二时钟信号的频率相同,即信号周期相同,而且,在对第二时钟信号进行相位调节之前,第一时钟信号和第二时钟信号的相位也相同。In existing applications, the clock device can output a clock signal according to a preset signal period, and the corresponding duration can be determined by counting the clock signal. In the PWM signal generation method provided by the embodiment of the present invention, the clock device is controlled to output the first clock signal and the second clock signal. In practical applications, in order to simplify the counting process in the subsequent steps, the frequencies of the first clock signal and the second clock signal are the same , that is, the signal period is the same, and the phases of the first clock signal and the second clock signal are also the same before the phase adjustment of the second clock signal is performed.
需要说明的是,第一时钟信号和第二时钟信号在本发明中的作用是不同的,具体将在后续内容中详细展开,此处暂不详述。It should be noted that the functions of the first clock signal and the second clock signal in the present invention are different, and the details will be described in detail in the subsequent content, and will not be described in detail here.
S110、按照预设计数方式分别对第一时钟信号和第二时钟信号进行计数。S110. Count the first clock signal and the second clock signal respectively according to a preset counting manner.
可选的,本实施例述及的预设计数方式,可以是递增计数、递减计数、增减计数以及减增计数中的任意一种,在实际应用中,可根据选用计数器的类型以及具体的应用需求选择,本发明对于预设计数方式的具体选择不做限定。至于各种计数方式的具体计数实现过程,将在后续内容中以具体事例方式阐明,此处暂不详述。Optionally, the preset counting method mentioned in this embodiment may be any one of up counting, down counting, up and down counting, and down counting. Selection of application requirements, the present invention does not limit the specific selection of the preset counting mode. As for the specific counting implementation process of various counting methods, it will be explained in the following content by way of specific examples, and will not be described in detail here.
S120、在计数过程中控制相位调节装置按预设相位差调节第二时钟信号的相位。S120: Control the phase adjustment device to adjust the phase of the second clock signal according to a preset phase difference during the counting process.
结合PWM信号的基本常识可知,PWM信号属于按照固定周期重复重现的方波信号,任一周期的PWM信号包括一定时长的高电平和一定时长的低电平,各个周期的信号生成过程是一致的,本实施例针对当前周期的PWM信号的生成过程进行介绍,至于当前周期之后的后续周期的PWM信号,重复执行本发明实施例提供的PWM信号生成方法即可,基于此,本步骤中述及的计数过程,即指生成当前周期的PWM信号所对应的计数过程。Combined with the basic knowledge of PWM signals, it can be seen that PWM signals are square wave signals that repeat according to a fixed period. The PWM signal of any period includes a high level for a certain period of time and a low level for a certain period of time. The signal generation process of each period is consistent. In this embodiment, the generation process of the PWM signal of the current cycle is introduced. As for the PWM signal of the subsequent cycle after the current cycle, the PWM signal generation method provided by the embodiment of the present invention can be repeatedly executed. and the counting process, that is, the counting process corresponding to the generation of the PWM signal of the current cycle.
可以理解的是,如果在开始计数前调节时钟信号的相位,在相位调节完成后开始计数,这对计数过程是没有影响的,由于并没有改变单个时钟信号的信号周期,时钟信号与计数值的乘积并不会改变,即不会改变相应的统计时长,而在计数过程中改变时钟信号的相位,会导致计数值提前或延迟变化,因此,在相同计数值的情况下,对应的统计时长是不同的,从而实现对PWM信号电平宽度的调节。It can be understood that if the phase of the clock signal is adjusted before starting counting, and the counting is started after the phase adjustment is completed, this has no effect on the counting process. Since the signal period of a single clock signal is not changed, the difference between the clock signal and the count value is The product does not change, that is, it does not change the corresponding statistical duration, but changing the phase of the clock signal during the counting process will cause the count value to change in advance or delay. Therefore, in the case of the same count value, the corresponding statistical duration is different, so as to realize the adjustment of the level width of the PWM signal.
现有应用中的相位调节装置,可以实现高分辨率的相位调节,一般情况下可以实现低于100ps的相位变化,远低于现有应用中200ps的高精度分辨率要求,因此,只要预设相位差小于第二时钟信号的时钟周期,就可以实现高于现有应用分辨率的PWM信号调节。The phase adjustment device in the existing application can achieve high-resolution phase adjustment. Generally, it can achieve a phase change of less than 100ps, which is far lower than the high-precision resolution requirement of 200ps in the existing application. Therefore, as long as the preset When the phase difference is smaller than the clock period of the second clock signal, a PWM signal adjustment higher than the resolution of the existing application can be realized.
进一步的,对于高精度PWM信号的实现需求主要包括两个方面,其一是高精度的PWM信号边沿,即对PWM信号内高低电平翻转跳变的时机进行更为精准、细致的调节,此种情况下PWM信号的周期是不变的,因此,也可以理解为对PWM信号的占空比进行更精准的调节;其二是高精度的PWM信号周期调节,基于PWM信号的构成可知,此种情况下,可以通过调节PWM信号高电平的宽度来实现,也可以通过调节PWM信号低电平的宽度来实现,当前,在仅进行周期调节的情况下,要求PWM信号进行电平翻转的时刻不能改变,也就是说,周期调节的过程只能发生在PWM信号的后半周期。基于此,在不同的应用需求下,对第二时钟信号进行相位调节的时机和预设相位差的选择也是不同的,为了以示区分,本发明将进行边沿调节时的预设相位差定义为第一预设相位差,相应的,将进行周期调节时的预设相位差定义为第二预设相位差,当然,不论是第一预设相位差还是第二预设相位差对应的时长,都是小于时钟信号的周期时长的。Further, the requirements for the realization of high-precision PWM signals mainly include two aspects. One is the high-precision PWM signal edge, that is, the timing of high-low level flips and jumps in the PWM signal is adjusted more accurately and meticulously. In this case, the period of the PWM signal is unchanged, so it can also be understood as a more precise adjustment of the duty cycle of the PWM signal; the second is the high-precision PWM signal period adjustment. Based on the composition of the PWM signal, this In this case, it can be realized by adjusting the width of the high level of the PWM signal, or it can be realized by adjusting the width of the low level of the PWM signal. Currently, in the case of only periodic adjustment, the level of the PWM signal is required to be reversed. The time cannot be changed, that is to say, the process of period adjustment can only occur in the second half period of the PWM signal. Based on this, under different application requirements, the timing of performing phase adjustment on the second clock signal and the selection of the preset phase difference are also different. In order to distinguish, the present invention defines the preset phase difference during edge adjustment as For the first preset phase difference, correspondingly, the preset phase difference during period adjustment is defined as the second preset phase difference. Of course, whether it is the time length corresponding to the first preset phase difference or the second preset phase difference, All are less than the period length of the clock signal.
基于前述内容,对于高精度PWM信号周期的应用需求,应该在第二时钟信号的计数值大于等于预设半周期计数值且小于预设全周期计数值的情况下,控制相位调节装置按照第二预设相位差调节第二时钟信号的相位,其中,预设全周期计数值即完整PWM信号所对应的时钟信号计数值。Based on the foregoing, for the application requirements of the high-precision PWM signal period, when the count value of the second clock signal is greater than or equal to the preset half-cycle count value and less than the preset full-cycle count value, the phase adjustment device should be controlled according to the second The preset phase difference adjusts the phase of the second clock signal, wherein the preset full cycle count value is the clock signal count value corresponding to the complete PWM signal.
对于高精度PWM信号边沿的应用需求,应该在第二时钟信号的计数值小于预设半周期计数值的情况下,控制相位调节装置按照第一预设相位差调节第二时钟信号的相位,其中,预设半周期计数值是基于PWM信号的占空比设置的,如前所述,一个完整的PWM信号对应的信号计数值为预设全周期计数值,则预设全周期计数值与占空比的乘积,即预设半周期计数值。由此可见,预设半周期计数值也可以理解为PWM信号进行周期内电平翻转时所对应的时钟信号的计数值。For the application requirements of high-precision PWM signal edges, when the count value of the second clock signal is less than the preset half-cycle count value, the phase adjustment device should be controlled to adjust the phase of the second clock signal according to the first preset phase difference, wherein , the preset half-cycle count value is set based on the duty cycle of the PWM signal. As mentioned above, the signal count value corresponding to a complete PWM signal is the preset full-cycle count value, then the preset full-cycle count value and the duty cycle The product of the duty ratio, that is, the preset half-cycle count value. It can be seen from this that the preset half-cycle count value can also be understood as the count value of the clock signal corresponding to the level inversion of the PWM signal during the cycle.
除了上述两种典型的实现需求之外,还可以要求同时对PWM信号的边沿和周期进行调节,此种情况下,需要综合上述情况实现,具体将在后续实施例中展开,此处暂不详述。In addition to the above two typical implementation requirements, it can also be required to adjust the edge and period of the PWM signal at the same time. In this case, it is necessary to integrate the above conditions to achieve, which will be developed in subsequent embodiments, which will not be detailed here. described.
S130、根据第二时钟信号的计数值,或者,第一时钟信号和第二时钟信号的计数值控制信号生成装置输出当前周期的PWM信号。S130. Control the signal generating device to output the PWM signal of the current cycle according to the count value of the second clock signal, or the count value of the first clock signal and the second clock signal.
如前所述,高精度PWM信号的实现需求包括高精度的PWM信号边沿和高精度的PWM信号周期调节两方面,在进行信号周期调节时主要根据第二时钟信号的计数值完成,在进行信号边沿调节时则需要结合第一时钟信号的计数值和第二时钟信号的计数值才能实现。当然,在实际应用中,还有可能需要同时对PWM信号的边沿和周期进行调节,本发明同样能够完成这一调节过程。As mentioned above, the realization requirements of high-precision PWM signal include two aspects: high-precision PWM signal edge and high-precision PWM signal period adjustment. Edge adjustment needs to be implemented by combining the count value of the first clock signal and the count value of the second clock signal. Of course, in practical applications, it may also be necessary to adjust the edge and period of the PWM signal at the same time, and the present invention can also complete this adjustment process.
需要说明的是,时钟信号的计数与PWM信号的电平输出是同时进行的,即在对时钟信号开始计数的同时,信号生成装置同步输出PWM信号的第一电平,并在后续的计数过程中,根据具体的计数情况,将第一电平切换为第二电平,或者,结束当前周期的PWM信号的生成,进一步开始输出下一周期的PWM信号。因此,本步骤中述及的根据具体的计数值控制信号生成装置输出PWM信号,实际是贯穿整个PWM信号生成过程的。It should be noted that the counting of the clock signal and the level output of the PWM signal are performed simultaneously, that is, when the clock signal starts to be counted, the signal generating device synchronously outputs the first level of the PWM signal, and in the subsequent counting process , according to the specific counting situation, the first level is switched to the second level, or the generation of the PWM signal of the current cycle is ended, and the output of the PWM signal of the next cycle is further started. Therefore, the control signal generating device according to the specific count value mentioned in this step to output the PWM signal actually runs through the entire PWM signal generating process.
可以理解的是,前述内容中述及的第一电平,可以是高电平,也可以是低电平,相应的,在第一电平为高电平的情况下,第二电平即低电平,在第一电平为低电平的情况下,第二电平则为高电平。It can be understood that the first level mentioned in the foregoing content may be a high level or a low level. Correspondingly, in the case where the first level is a high level, the second level is Low level, when the first level is a low level, the second level is a high level.
综上所述,本发明实施例提供的PWM信号生成方法,在计数过程中对第二时钟信号的相位进行调节,由于第二时钟信号的相位发生变化,导致在采用相同计数值的情况下,对应的信号宽度发生变化,进一步由于预设相位差小于时钟周期,信号宽度的变化会相应的小于时钟周期,即实现了分辨率小于时钟周期、精度更高的PWM信号。To sum up, in the PWM signal generation method provided by the embodiment of the present invention, the phase of the second clock signal is adjusted during the counting process. Since the phase of the second clock signal changes, when the same count value is used, The corresponding signal width changes, and further because the preset phase difference is smaller than the clock period, the change in the signal width is correspondingly smaller than the clock period, that is, a PWM signal with a resolution smaller than the clock period and higher precision is realized.
进一步的,通过相位调节时机的选择,还可以具体实现边沿调节、周期调节中的至少一种,充分满足实际应用需求。Further, through the selection of the phase adjustment timing, at least one of edge adjustment and period adjustment can be specifically implemented, which fully meets practical application requirements.
下面结合具体波形图对应用本发明提供的PWM信号生成方法输出PWM信号的过程。需要提前说明的是,如前所述,对时钟信号进行计数的方式有多种,PWM信号又存在类型之分,加之PWM信号的多种高精度调节需求,可以组合处多种具体的实施方式,后续内容对相似类型的调节过程进行汇总,并予以重点介绍。其中,PWM信号的第一类型是指前半周期输出低电平,后半周期则输出高电平;相应的,PWM信号的第二类型则指前半周期输出高电平,后半周期输出低电平。The following describes the process of applying the PWM signal generating method provided by the present invention to output the PWM signal with reference to the specific waveform diagrams. It should be noted in advance that, as mentioned above, there are many ways to count the clock signal, and there are different types of PWM signals. In addition, the various high-precision adjustment requirements of PWM signals can be combined in various specific implementations. , and the subsequent content summarizes similar types of adjustment processes and focuses on them. Among them, the first type of PWM signal refers to outputting a low level in the first half cycle, and outputting a high level in the second half cycle; correspondingly, the second type of PWM signal refers to outputting a high level in the first half cycle and outputting a low level in the second half cycle. flat.
在后续的实施例中,clk1表示第一时钟信号,clk2表示第二时钟信号;counter表示对时钟信号的计数值,在具体实施例中,可以表示对第一时钟信号的计数,也可以表示对第二时钟信号的计数,具体将针对具体实施例说明;PWM_1和PWM_1’均是为便于理解方案给出的参考波形图,并非实际输出的PWM信号的波形图,只有在Final output字样下对应的波形才表示实际输出的PWM信号。In the following embodiments, clk1 represents the first clock signal, clk2 represents the second clock signal; counter represents the count value of the clock signal. The count of the second clock signal will be specifically described with respect to specific embodiments; both PWM_1 and PWM_1' are reference waveform diagrams given to facilitate the understanding of the scheme, not the waveform diagram of the actual output PWM signal, only the corresponding waveforms under the word Final output The waveform represents the actual output PWM signal.
基于上述说明,参见图2a,图2a示出一种采用递增计数、实现高精度边沿调节的第一类型PWM信号的生成过程。Based on the above description, referring to FIG. 2a, FIG. 2a shows a generation process of a first type PWM signal that adopts incremental counting and realizes high-precision edge adjustment.
如图2所示,在控制时钟装置同时输出第一时钟信号和第二时钟信号的同时,采用递增计数的方式统计时钟信号的个数。可以理解的是,在第一时钟信号和第二时钟信号频率相同的情况下,由于第一预设相位差小于第二时钟信号的时钟周期,第一时钟信号对应的预设半周期计数值和第二时钟信号对应的预设半周期计数值实际是相同的,只不过二者真正达到该预设半周期计数值的时间会有所差异,当然,这也是本发明实现高精度信号边沿调节的关键。因此,图2中的counter可以同时表示第一时钟信号和第二时钟信号的计数要求,其中,N表示预设半周期计数值,pe和0则在不同情况下分别表示预设全周期计数值,可以理解的是,在对时钟信号进行递增计数的情况下,pe表示预设全周期计数值,相反的,在对时钟信号进行递减计数的情况下,0则表示预设全周期计数值。As shown in FIG. 2 , while the clock device is controlled to output the first clock signal and the second clock signal simultaneously, the number of the clock signals is counted by means of incremental counting. It can be understood that, when the frequencies of the first clock signal and the second clock signal are the same, since the first preset phase difference is smaller than the clock period of the second clock signal, the preset half-cycle count value corresponding to the first clock signal and The preset half-cycle count value corresponding to the second clock signal is actually the same, but the time when the two actually reach the preset half-cycle count value will be different. Of course, this is also the method of the present invention to achieve high-precision signal edge adjustment The essential. Therefore, the counter in FIG. 2 can represent the counting requirements of the first clock signal and the second clock signal at the same time, wherein N represents the preset half-cycle count value, and pe and 0 respectively represent the preset full-cycle count value under different circumstances. It can be understood that in the case of counting up the clock signal, pe represents the preset full cycle count value, on the contrary, in the case of counting down the clock signal, 0 represents the preset full cycle count value.
在进行高精度的PWM信号边沿调节过程中,根据第一时钟信号的计数值控制信号生成装置停止当前周期的PWM信号的输出,即根据第一时钟信号的计数值确定当前周期PWM信号的总脉冲宽度(包括高电平的宽度和低电平的宽度),同时,根据第二时钟信号的计数值确定当前周期内进行电平切换的时机。During the high-precision PWM signal edge adjustment process, the signal generating device is controlled to stop the output of the PWM signal of the current cycle according to the count value of the first clock signal, that is, the total pulses of the PWM signal of the current cycle are determined according to the count value of the first clock signal The width (including the width of the high level and the width of the low level), and at the same time, the timing of level switching in the current cycle is determined according to the count value of the second clock signal.
如图2a所示,在第二时钟信号的计数值达到预设半周期计数值N之前,控制信号生成装置输出当前周期的PWM信号的第一电平,即低电平,并在第二时钟信号的计数值达到预设半周期计数值N的过程中,控制第二时钟信号的相位后移第一预设相位差TPS1。由于时钟信号的相位后移,导致计数值达到预设半周期计数值的时间后移,使得第一电平的对应的时长变长,电平宽度由移相前的TL,变为最终输出的TL+TPS1,当然,由于并未对第一时钟信号的相位进行调节,对当前周期的PWM信号的总宽度不会有任何影响。As shown in FIG. 2a, before the count value of the second clock signal reaches the preset half-cycle count value N, the control signal generating device outputs the first level of the PWM signal of the current cycle, that is, the low level, and at the second clock When the count value of the signal reaches the preset half-cycle count value N, the phase of the second clock signal is controlled to be shifted backward by the first preset phase difference T PS1 . Due to the backward shift of the phase of the clock signal, the time when the count value reaches the preset half-cycle count value is shifted backward, so that the corresponding duration of the first level becomes longer, and the level width changes from TL before the phase shift to the final output Of course , since the phase of the first clock signal is not adjusted, it will not have any effect on the total width of the PWM signal in the current cycle.
在第二时钟信号的计数值等于预设半周期计数值时,说明已经达到第一电平的预期宽度,控制信号生成装置将第一电平切换为当前周期的PWM信号的第二电平,即输出图2a所示的高电平。进一步的,在第二时钟信号的计数值大于等于预设半周期计数值且第一时钟信号的计数值小于预设全周期计数值的情况下,控制信号生成装置维持输出第二电平,即实现高电平的持续输出。When the count value of the second clock signal is equal to the preset half-cycle count value, it indicates that the expected width of the first level has been reached, and the control signal generating device switches the first level to the second level of the PWM signal of the current cycle, That is, the high level shown in Figure 2a is output. Further, when the count value of the second clock signal is greater than or equal to the preset half-cycle count value and the count value of the first clock signal is less than the preset full-cycle count value, the control signal generating device maintains the output of the second level, that is, A high-level continuous output is achieved.
最后,在第一时钟信号的计数值达到预设全周期计数值的情况下,控制信号生成装置停止输出所述第二电平。结合图2所示以及前述内容,本实施例通过第一时钟信号的计数值控制当前周期的PWM信号的周期,由于并未对第一时钟信号进行移相,最终输出的PWM信号的周期并未发生改变,但是,与图2中PWM_1所示的参考PWM波形相比,最终输出的PWM信号的高电平的宽度缩小为TH-TPS1,将PWM信号的发送电平翻转的边沿时刻调整了TPS1对应的时长,与现有技术中最小改变一个时钟周期的边沿调节相比,显然分辨率更小,边沿调节的精度更高。Finally, when the count value of the first clock signal reaches the preset full cycle count value, the control signal generating device stops outputting the second level. 2 and the foregoing content, in this embodiment, the period of the PWM signal of the current cycle is controlled by the count value of the first clock signal. Since the first clock signal is not phase-shifted, the period of the final output PWM signal does not change. However, compared with the reference PWM waveform shown in PWM_1 in Figure 2, the width of the high level of the final output PWM signal is reduced to T H -T PS1 , and the edge timing of the inversion of the transmission level of the PWM signal is adjusted. Compared with the edge adjustment in which the minimum change of one clock cycle is performed in the prior art, the resolution is obviously smaller and the precision of the edge adjustment is higher.
对于图2b-图2d的具体调节过程,可参见上述图2a实现,此处不再一一展开。其中,图2b示出对第一类型的PWM信号进行边沿前移的过程,图2c示出对第二类型的PWM信号进行边沿后移的过程,图2d示出对第二类型的PWM信号进行边沿前移的过程。For the specific adjustment process of FIG. 2b-FIG. 2d, please refer to the above-mentioned FIG. 2a for implementation, and will not be expanded here. Wherein, Fig. 2b shows the process of performing edge forwarding on the PWM signal of the first type, Fig. 2c shows the process of performing edge-backward shifting on the PWM signal of the second type, and Fig. 2d shows the process of performing the edge shifting on the PWM signal of the second type The process of moving the edge forward.
可选的,参见图3a-图3d,示出采用递减计数方式实现高精度PWM边沿调节的过程。Optionally, referring to Fig. 3a-Fig. 3d , a process of implementing high-precision PWM edge adjustment in a down-counting manner is shown.
通过递减计数的方式通过第一时钟信号完成PWM信号的周期控制,在第二时钟信号的计数为预设半周期计数值N时刻控制PWM信号电平翻转。对于图3a和图3b,在N时刻前,假定已经根据要实现的高精度脉冲宽度TPS1,对第二时钟信号进行向前或向后移相TPS1,则等效的当前周期的PWM信号的高电平或低电平的宽度被调整为(TH/TL±TPS1)。The period control of the PWM signal is completed by the first clock signal by means of down counting, and the level of the PWM signal is controlled to be inverted when the count of the second clock signal is the preset half-cycle count value N. For Fig. 3a and Fig. 3b, before time N, it is assumed that the second clock signal has been phase-shifted forward or backward T PS1 according to the high-precision pulse width T PS1 to be realized, then the equivalent current cycle of the PWM signal The width of the high or low level of is adjusted to ( TH / TL ±T PS1 ).
对于图3c和图3d,在1时刻前,假定已经根据要实现的高精度脉冲宽度TPS2,对第二时钟信号进行向前或向后移相TPS2,则等效PWM信号高或低电平宽度被调整为(TH/TL±TPS2)。第一类型代表当计数器大于N,输出高电平,第二类型代表当计数器大于N,输出低电平。For Figure 3c and Figure 3d, before
可选的,图4a-图4d示出采用增减计数,即先递增后递减的计数方式输出PWM信号的过程。与前述实施例类似,通过增减计数方式来使用第一时钟信号完成PWM信号的全周期,即预设全周期计数值的计数,通过第二时钟信号完成PWM信号周期内电平翻转的计数,在增计数为预设半周期计数值N时刻进行PWM信号电平翻转,相应的,在减计数为预设半周期计数值N时刻进行PWM信号电平翻转。Optionally, FIGS. 4 a to 4 d illustrate the process of outputting the PWM signal by adopting an increment and decrement count, that is, a counting manner in which the PWM signal is outputted firstly and then decremented. Similar to the previous embodiment, the first clock signal is used to complete the full cycle of the PWM signal by increasing and decreasing the counting method, that is, the counting of the preset full cycle count value, and the second clock signal is used to complete the counting of level inversions in the PWM signal cycle, The PWM signal level inversion is performed when the up-count is the preset half-cycle count value N, and correspondingly, the PWM signal level is inverted when the down-count is the preset half-cycle count value N.
在增计数为N时刻前,假定已经根据要实现的高精度脉冲宽度TPS1,对第二时钟信号进行向前或向后移相TPS1,则等效PWM信号高或低电平宽度被调整为(TH/TL±TPS1)。Before the count-up is N, it is assumed that the second clock signal has been phase-shifted forward or backward T PS1 according to the high-precision pulse width T PS1 to be realized, then the high or low level width of the equivalent PWM signal is adjusted is ( TH / TL ±T PS1 ).
在减计数为N时刻前,假定已经根据要实现的高精度脉冲宽度TPS2,对第二时钟信号向前或向后移相TPS2,则等效PWM信号高或低电平宽度被调整为(TH/TL±TPS2)。第一类型代表当计数器大于N,输出高电平,第二类型代表当计数器大于N,输出低电平。Before the countdown is N, it is assumed that the second clock signal has been phase-shifted forward or backward T PS2 according to the high-precision pulse width T PS2 to be realized, then the equivalent PWM signal high or low level width is adjusted to (T H / TL ±T PS2 ). The first type means that when the counter is greater than N, a high level is output, and the second type means that when the counter is greater than N, a low level is output.
可选的,图5a-图5d示出采用减增计数,即先递减后递增的计数方式输出PWM信号的过程。与前述实施例类似,通过减增计数方式来使用第一时钟信号完成PWM信号的全周期,即预设全周期计数值的计数,通过第二时钟信号完成PWM信号周期内电平翻转的计数,在减计数为预设半周期计数值N时刻进行PWM信号电平翻转,相应的,在增计数为预设半周期计数值N时刻进行PWM信号电平翻转。Optionally, FIGS. 5 a to 5 d illustrate the process of outputting the PWM signal by adopting the counting down and up counting, that is, in the counting manner of first decreasing and then increasing. Similar to the previous embodiment, the first clock signal is used to complete the full cycle of the PWM signal by counting down, that is, the counting of the preset full cycle count value, and the second clock signal is used to complete the counting of level inversions in the PWM signal cycle, The PWM signal level inversion is performed when the countdown is the preset half-cycle count value N, and correspondingly, the PWM signal level is inverted when the count-up is the preset half-cycle count value N.
在减计数为N时刻前,假定已经根据要实现的高精度脉冲宽度TPS1,对第二时钟信号进行向前或向后移相TPS1,则等效PWM信号高或低电平宽度被调整为(TH/TL±TPS1)。Before the countdown is N, it is assumed that the second clock signal has been phase-shifted forward or backward T PS1 according to the high-precision pulse width T PS1 to be realized, then the high or low level width of the equivalent PWM signal is adjusted is ( TH / TL ±T PS1 ).
在增计数为N时刻前,假定已经根据要实现的高精度脉冲宽度TPS2,对第二时钟信号向前或向后移相TPS2,则等效PWM信号高或低电平宽度被调整为(TH/TL±TPS2)。第一类型代表当计数器大于N,输出高电平,第二类型代表当计数器大于N,输出低电平。Before the count-up is N time, it is assumed that the second clock signal has been phase-shifted forward or backward T PS2 according to the high-precision pulse width T PS2 to be realized, then the equivalent PWM signal high or low level width is adjusted to (T H / TL ±T PS2 ). The first type means that when the counter is greater than N, a high level is output, and the second type means that when the counter is greater than N, a low level is output.
可选的,上述图2-图5各个实施例分别示出进行PWM信号边沿高精度调节的实现过程,针对任一实施例,在第一时钟信号的计数值等于预设全周期计数值时,可将第一时钟信号的计数值和第二时钟信号的计数值清零,进一步开展下一周期的PWM信号的输出。Optionally, each of the above-mentioned embodiments of FIG. 2 to FIG. 5 respectively shows the implementation process of performing high-precision adjustment of the edge of the PWM signal. For any embodiment, when the count value of the first clock signal is equal to the preset full cycle count value, The count value of the first clock signal and the count value of the second clock signal can be cleared to further output the PWM signal of the next cycle.
下面对进行PWM信号周期的高精度调节过程进行介绍:The following is an introduction to the high-precision adjustment process of the PWM signal period:
参见图6a-图6d,如前所述,任一波形图中示出的PWM_1并非实际输出的PWM信号,PWM_1’才是实际输出的PWM信号,通过PWM_1和PWM_1’的对比,能够清楚的示出PWM信号的周期变化。在本实施例中,counter表示的是对第二时钟信号的计数方式。需要说明的是,由于进行PWM信号周期调节的过程单独依赖于第二时钟信号即可实现,因此,为了降低整体能耗,可以控制时钟装置只输出第二时钟信号。当然,从简化控制逻辑的角度出发,也可以不对这一差异进行区分,按照前述内容同时输出第一时钟信号和第二时钟信号,并同时对二者进行计数。Referring to Figures 6a-6d, as mentioned above, the PWM_1 shown in any waveform diagram is not the actual output PWM signal, and PWM_1' is the actual output PWM signal. By comparing PWM_1 and PWM_1', it can be clearly shown that The period change of the output PWM signal. In this embodiment, counter represents a counting method for the second clock signal. It should be noted that, since the process of adjusting the period of the PWM signal can be implemented solely by relying on the second clock signal, in order to reduce the overall energy consumption, the clock device may be controlled to output only the second clock signal. Of course, from the perspective of simplifying the control logic, the difference may not be distinguished, and the first clock signal and the second clock signal are simultaneously output according to the foregoing content, and both are counted at the same time.
以图6a为例,在控制时钟装置输出第二时钟信号的同时,采用递增计数的方式统计时钟信号的个数,并根据第二时钟信号的计数值控制信号生成装置进行当前周期的PWM信号的电平切换,以及,停止当前周期的PWM信号的输出。Taking Fig. 6a as an example, when the clock device is controlled to output the second clock signal, the number of clock signals is counted by means of incremental counting, and the signal generating device is controlled to perform the PWM signal generation of the current cycle according to the count value of the second clock signal. Level switching, and, stop the output of the PWM signal of the current cycle.
具体的,如图6a所示,在第二时钟信号的计数值达到预设半周期计数值N之前,控制信号生成装置输出当前周期的PWM信号的第一电平,即低电平;在第二时钟信号的计数值等于预设半周期计数值N时,控制信号生成装置将第一电平切换为当前周期的PWM信号的第二电平,即由低电平切换为高电平。Specifically, as shown in FIG. 6a, before the count value of the second clock signal reaches the preset half-cycle count value N, the control signal generating device outputs the first level of the PWM signal of the current cycle, that is, the low level; When the count value of the two clock signals is equal to the preset half-cycle count value N, the control signal generating device switches the first level to the second level of the PWM signal of the current cycle, that is, from low level to high level.
进一步的,在第二时钟信号的计数值大于等于预设半周期计数值N且小于预设全周期计数值pe的情况下,控制信号生成装置维持输出第二电平,并在维持输出第二电平的过程中,控制第二时钟信号向后移相,距离为第二预设相位差TPS,在第二时钟信号的计数值达到预设全周期计数值的情况下,控制信号生成装置停止输出第二电平,结束当前周期的PWM信号的输出。Further, when the count value of the second clock signal is greater than or equal to the preset half-cycle count value N and less than the preset full-cycle count value pe, the control signal generating device maintains outputting the second level, and maintains outputting the second level. In the process of leveling, the second clock signal is controlled to shift the phase backward, the distance is the second preset phase difference T PS , and when the count value of the second clock signal reaches the preset full cycle count value, the control signal generation device Stop outputting the second level, and end the output of the PWM signal of the current cycle.
可以理解的是,由于第二时钟信号的相位向后移动,导致第二时钟信号的计数值对应的时长发生变化,进而相对于图6a中示出的PWM_1的周期发生变化,即延长了PWM信号的周期,周期的变化量为TPS对应的时长。如前所述,由于第二预设相位差小于第二时钟信号的信号周期,因此实现了小于时钟信号周期的PWM信号周期调节。It can be understood that since the phase of the second clock signal moves backward, the duration corresponding to the count value of the second clock signal changes, which in turn changes relative to the period of PWM_1 shown in FIG. 6a , that is, the PWM signal is extended. period, and the variation of the period is the duration corresponding to T PS . As mentioned above, since the second preset phase difference is smaller than the signal period of the second clock signal, the PWM signal period adjustment smaller than the clock signal period is realized.
进一步的,在第二时钟信号的计数值达到预设全周期计数值的情况下,完成了当前周期PWM信号的输出,可以将第二时钟信号的计数值清零,为输出下一周期的PWM信号做准备。Further, when the count value of the second clock signal reaches the preset full cycle count value, the output of the PWM signal of the current cycle is completed, and the count value of the second clock signal can be cleared to output the PWM signal of the next cycle. signal ready.
对于图6b-图6d的具体调节过程,可参见上述图6a实现,此处不再一一展开。其中,图6b示出对第二类型的PWM信号进行周期延长的过程,图6c示出对第一类型的PWM信号进行周期缩短的过程,图6d示出对第二类型的PWM信号进行周期缩短的过程。其中,TPR表示进行周期调节前的PWM信号周期,TPR±TPS则表示进行周期调节后的PWM信号的周期。For the specific adjustment process in FIGS. 6b to 6d, it can be realized by referring to the above-mentioned FIG. 6a, and will not be expanded here. 6b shows the process of extending the period of the PWM signal of the second type, FIG. 6c shows the process of shortening the period of the PWM signal of the first type, and FIG. 6d shows the process of shortening the period of the PWM signal of the second type the process of. Among them, T PR represents the period of the PWM signal before the period adjustment is performed, and T PR ±T PS represents the period of the PWM signal after the period adjustment is performed.
可选的,基于上述内容,参见图7a-图7d,示出采用递减计数方式实现高精度PWM周期调节的过程。Optionally, based on the above content, referring to FIGS. 7 a to 7 d , a process of implementing high-precision PWM period adjustment in a down-counting manner is shown.
通过递减计数的方式来完成PWM信号周期调节过程的计数,在第二时钟信号的计数值达到预设半周期计数值N时,控制PWM信号进行电平翻转,在计数值降低至0时,控制信号生成装置停止输出第二电平,实现当前周期的PWM信号的周期调节。在下一个周期开始时,即在计数为pe时刻,开始输出下一个PWM信号。通过对第二时钟信号向前或向后移相TPS,则等效PWM信号周期实现了高精度的周期调整(TPR±TPS)。第一类型代表当计数器大于等于N,输出高电平,第二类型代表当计数器大于等于N,输出低电平。The counting of the PWM signal period adjustment process is completed by counting down. When the count value of the second clock signal reaches the preset half-cycle count value N, the PWM signal is controlled to perform level inversion, and when the count value is reduced to 0, the control The signal generating device stops outputting the second level to realize period adjustment of the PWM signal of the current period. When the next cycle starts, that is, when the count is pe, the next PWM signal starts to be output. By shifting the phase of the second clock signal forward or backward by T PS , the equivalent PWM signal period achieves a highly accurate period adjustment (T PR ±T PS ). The first type means that when the counter is greater than or equal to N, it outputs a high level, and the second type means that when the counter is greater than or equal to N, it outputs a low level.
可选的,参见图8a-图8d,示出采用增减计数的方式实现高精度PWM信号周期调节的过程。Optionally, referring to FIGS. 8 a to 8 d , a process of realizing high-precision PWM signal period adjustment by means of counting up and down is shown.
通过增减计数的方式来完成PWM信号周期的高精度调节,如图所示,在增计数为N时刻PWM信号翻转为高/低电平,在减计数为N时刻PWM信号翻转为低/高电平,在整个计数周期内除0外的任意时刻,对FPGA内部时钟进行向前或向后移相TPS,则等效PWM信号周期实现了高精度的周期调整(TPR±TPS)。第一类型代表当计数器大于N,输出高电平,第二类型代表当计数器大于N,输出低电平。The high-precision adjustment of the PWM signal cycle is accomplished by counting up and down. As shown in the figure, the PWM signal flips to high/low level when the up-count is N, and the PWM signal flips to low/high when the down-count is N. level, at any time other than 0 in the entire counting cycle, the FPGA internal clock is phase-shifted forward or backward by T PS , then the equivalent PWM signal cycle achieves high-precision period adjustment (T PR ±T PS ) . The first type means that when the counter is greater than N, a high level is output, and the second type means that when the counter is greater than N, a low level is output.
可选的,参见图9a-图9d,示出采用减增计数的方式实现高精度PWM信号周期调节的过程。Optionally, referring to Fig. 9a-Fig. 9d , a process of realizing high-precision PWM signal period adjustment in the manner of counting down and up is shown.
通过减增计数的方式来完成PWM信号周期的高精度调节,如图所示,在减计数为N时刻PWM信号翻转为高/低电平,在增计数为N时刻PWM信号翻转为低/高电平,在整个计数周期内除0外的任意时刻,对FPGA内部时钟进行向前或向后移相TPS,则等效PWM信号周期实现了高精度的周期调整(TPR±TPS)。第一类型代表当计数器大于N,输出高电平,第二类型代表当计数器大于N,输出低电平。The high-precision adjustment of the PWM signal cycle is accomplished by down-counting. As shown in the figure, the PWM signal flips to high/low level when the down-count is N, and the PWM signal flips to low/high when the up-count is N. level, at any time other than 0 in the entire counting cycle, the FPGA internal clock is phase-shifted forward or backward by T PS , then the equivalent PWM signal cycle achieves high-precision period adjustment (T PR ±T PS ) . The first type means that when the counter is greater than N, a high level is output, and the second type means that when the counter is greater than N, a low level is output.
进一步的,本发明实施例还提供一种能够同时对PWM信号的边沿和周期进行调节的信号生成方法。Further, the embodiment of the present invention also provides a signal generation method capable of adjusting the edge and period of the PWM signal at the same time.
基于前述内容可知,进行PWM信号边沿调节时,需要在PWM信号对应的前半周期内对第二时钟信号的相位进行调节,并依赖于第一时钟信号的计数值确保PWM信号的周期不发生变化,相应的,如果同时进行边沿和周期的调节,就不再需要第一时钟信号来保证PWM信号的周期不变,因此,同时进行PWM信号的边沿和周期调节,只需依赖于第二时钟信号即可。Based on the foregoing, it can be seen that when performing edge adjustment of the PWM signal, it is necessary to adjust the phase of the second clock signal in the first half cycle corresponding to the PWM signal, and rely on the count value of the first clock signal to ensure that the period of the PWM signal does not change, Correspondingly, if the edge and period adjustments are performed at the same time, the first clock signal is no longer needed to ensure that the period of the PWM signal remains unchanged. Therefore, the edge and period adjustments of the PWM signal are performed at the same time, only relying on the second clock signal. Can.
如前所述,进行边沿调节必须在PWM信号的前半周期完成,即在第二时钟信号的计数值小于预设半周期计数值,亦即当前周期的PWM信号处于第一电平的过程中,控制相位调节装置按照第三预设相位差调节第二时钟信号的相位。当然,第三预设相位差已然小于第二时钟信号的信号周期。As mentioned above, the edge adjustment must be completed in the first half cycle of the PWM signal, that is, when the count value of the second clock signal is less than the preset half cycle count value, that is, the PWM signal of the current cycle is at the first level. The phase adjustment device is controlled to adjust the phase of the second clock signal according to the third preset phase difference. Of course, the third preset phase difference is already smaller than the signal period of the second clock signal.
通过上述调节,可以改变第二时钟信号计数值达到预设半周期计数值的时长,进而实现PWM信号边沿的高精度调节,具体实现原理可以参见前述内容,此处不再复述。Through the above adjustment, the duration of the second clock signal count value reaching the preset half-cycle count value can be changed, thereby realizing high-precision adjustment of the PWM signal edge.
在第二时钟信号计数值达到预设半周期计数值时,控制信号生成装置切换PWM信号的电平,即由第一电平切换为第二电平。When the count value of the second clock signal reaches the preset half-cycle count value, the control signal generating device switches the level of the PWM signal, that is, from the first level to the second level.
在第二时钟信号的计数值大于等于预设半周期计数值且小于全周期计数值的情况下,控制信号生成装置维持输出第二电平,并在第二时钟信号的计数值达到预设全周期计数值的情况下,控制信号生成装置停止输出第二电平,完成PWM信号边沿和周期的同时调节。When the count value of the second clock signal is greater than or equal to the preset half-cycle count value and less than the full-cycle count value, the control signal generating device maintains outputting the second level, and when the count value of the second clock signal reaches the preset full cycle count value In the case of the period count value, the control signal generation device stops outputting the second level, and completes the simultaneous adjustment of the edge and the period of the PWM signal.
基于上述内容,参见图10a-图10d,通过递增计数的方式来使用第一时钟信号示出调节前的PWM信号的参考波形的生成过程,在计数为N时刻PWM信号翻转为高/低电平,在计数达到预设全周期计数值时停止输出当前周期的PWM信号,所得当前周期的PWM信号的高电平的宽度为TH,低电平的宽度为TL。基于前述移相时刻的说明,对第二时钟信号进行前或向后移相TPS,则等效PWM信号周期实现高精度的周期调整(TPR±TPS)。Based on the above content, referring to FIGS. 10a-10d, the first clock signal is used to illustrate the generation process of the reference waveform of the PWM signal before adjustment by counting up, and the PWM signal is turned to high/low level when the count is N , when the count reaches the preset full-cycle count value, stop outputting the PWM signal of the current cycle, and the obtained PWM signal of the current cycle has a high level width TH and a low level width TL . Based on the description of the aforementioned phase-shifting moment, the second clock signal is phase-shifted forward or backward by T PS , so that the period of the equivalent PWM signal can be adjusted with high precision (T PR ±T PS ).
在达到预设全周期计数值前,假定已经根据要实现的高精度脉冲宽度TPS1,对第二时钟信号进行向前或向后移相TPS1,则等效PWM信号高或低电平宽度被调整为(TH/TL±TPS1(±TPS)),在下一周期开始时,将第二时钟信号右移Tc-Tps1恢复与第一时钟信号对齐(当然,也可以控制时钟装置重新输出第一时钟信号和第二时钟信号),Tc为第一个时钟clk1的周期。Before reaching the preset full-cycle count value, assuming that the second clock signal has been phase-shifted forward or backward T PS1 according to the high-precision pulse width T PS1 to be achieved, the equivalent PWM signal is high or low level width is adjusted to (T H / TL ±T PS1 (±T PS )), at the beginning of the next cycle, the second clock signal is shifted right by T c -T ps1 to restore alignment with the first clock signal (of course, it can also be controlled by The clock device re-outputs the first clock signal and the second clock signal), and T c is the period of the first clock clk1.
在第二时钟信号的计数值达到预设半周期计数值前,假定已经根据要实现的高精度脉冲宽度TPS2,对第二时钟信号进行向前或向后移相TPS2,则等效PWM信号高或低电平宽度被调整为(TH/TL±TPS2(±TPS)),在新的周期开始时,将第二时钟信号右移Tc-Tps2恢复与第一时钟信号对齐。此处占空比的变化需要考虑周期调节过程中TPS的影响,根据该值调节TPS1、TPS2的大小,来实现最终的PWM信号边沿调节效果,第一类型代表当计数器大于N,输出高电平,第二类型代表当计数器大于N,输出低电平。Before the count value of the second clock signal reaches the preset half-cycle count value, it is assumed that the second clock signal has been phase-shifted forward or backward T PS2 according to the high-precision pulse width T PS2 to be realized, then the equivalent PWM The signal high or low level width is adjusted to (T H / TL ±T PS2 (±T PS )), at the beginning of a new cycle, the second clock signal is shifted to the right by T c -T ps2 to restore the first clock signal alignment. The change of the duty cycle here needs to consider the influence of T PS during the period adjustment process. Adjust the size of T PS1 and T PS2 according to this value to achieve the final PWM signal edge adjustment effect. The first type represents that when the counter is greater than N, the output High level, the second type means that when the counter is greater than N, the output is low level.
可选的,参见图11a-图11d,通过递减计数的方式来使用第一时钟信号示出调节前的PWM信号的参考波形的生成过程,在计数为N时刻PWM信号翻转为高/低电平,在计数达到预设全周期计数值时停止输出当前周期的PWM信号,所得当前周期的PWM信号的高电平的宽度为TH,低电平的宽度为TL。基于前述移相时刻的说明,对第二时钟信号进行向前或向后移相TPS,则等效PWM信号周期实现了高精度的周期调整(TPR±TPS)。Optionally, referring to FIGS. 11 a to 11 d , the first clock signal is used to show the generation process of the reference waveform of the PWM signal before adjustment by counting down, and the PWM signal is turned to high/low level when the count is N. , when the count reaches the preset full-cycle count value, stop outputting the PWM signal of the current cycle, and the obtained PWM signal of the current cycle has a high level width TH and a low level width TL . Based on the description of the aforementioned phase-shifting moment, the second clock signal is phase-shifted forward or backward by T PS , so that the period of the equivalent PWM signal realizes a high-precision period adjustment (T PR ±T PS ).
在达到预设全周期计数值前,假定已经根据要实现的高精度脉冲宽度TPS1,对第二时钟信号进行向前或向后移相TPS1,则等效PWM信号高或低电平宽度被调整为(TH/TL±TPS1(±TPS)),在新的周期开始时,将第二时钟信号右移Tc-Tps1恢复与第一时钟信号对齐,Tc为第一个时钟clk1的周期。Before reaching the preset full-cycle count value, assuming that the second clock signal has been phase-shifted forward or backward T PS1 according to the high-precision pulse width T PS1 to be achieved, the equivalent PWM signal is high or low level width is adjusted to (T H /T L ±T PS1 (±T PS )), at the beginning of a new cycle, the second clock signal is shifted to the right by T c -T ps1 to restore alignment with the first clock signal, and T c is the first clock signal. One cycle of clock clk1.
在达到预设半周期计数值前,假定已经根据要实现的高精度脉冲宽度TPS2,对第二时钟信号进行向前或向后移相TPS2,则等效PWM信号高或低电平宽度被调整为(TH/TL±TPS2(±TPS)),在下一周期开始时,将第二时钟信号右移Tc-Tps2恢复与第一时钟信号对齐。此处高电平宽度、低电平宽度变化需要考虑周期调节过程中TPS的影响,根据该值调节TPS1、TPS2的大小,来实现最终的PWM信号边沿调节效果,第一类型代表当计数器大于N,输出高电平,第二类型代表当计数器大于N,输出低电平。Before reaching the preset half-cycle count value, it is assumed that the second clock signal has been phase-shifted forward or backward T PS2 according to the high-precision pulse width T PS2 to be realized, then the equivalent PWM signal high or low level width is adjusted to ( TH / TL ±T PS2 (±T PS )), and at the beginning of the next cycle, the second clock signal is shifted right by T c −T ps2 to restore alignment with the first clock signal. Here, the change of high-level width and low-level width needs to consider the influence of T PS during the period adjustment process, and adjust the size of T PS1 and T PS2 according to this value to achieve the final PWM signal edge adjustment effect. The first type represents when When the counter is greater than N, it outputs a high level. The second type represents that when the counter is greater than N, it outputs a low level.
可选的,参见图12a-图12d,通过先增后减计数的方式来使用第一时钟信号示出调节前的PWM信号的参考波形的生成过程,为进行任何调节的情况下,PWM信号的高电平的宽度为TH,低电平的宽度为TL。基于前述移相时刻的说明,对第二时钟信号进行向前或向后移相TPS,则等效PWM信号周期实现了高精度的周期调整(TPR±TPS)。Optionally, referring to FIGS. 12a to 12d , the first clock signal is used to show the generation process of the reference waveform of the PWM signal before adjustment by counting up first and then down. The width of the high level is TH and the width of the low level is TL . Based on the description of the aforementioned phase-shifting moment, the second clock signal is phase-shifted forward or backward by T PS , so that the period of the equivalent PWM signal can be adjusted with high precision (T PR ±T PS ).
在减计数N时刻前,假定已经根据要实现的高精度脉冲宽度TPS1,对第二时钟信号进行向前或向后移相TPS1,则等效PWM信号高或低电平宽度被调整为(TH/TL±TPS1(±TPS)),在新的周期开始时,将第二时钟信号右移Tc-Tps1恢复与第一时钟信号对齐,Tc为第一个时钟clk1的周期。Before the countdown N time, it is assumed that the second clock signal has been phase-shifted forward or backward T PS1 according to the high-precision pulse width T PS1 to be realized, then the equivalent PWM signal high or low level width is adjusted to (T H /T L ±T PS1 (±T PS )), at the beginning of a new cycle, shift the second clock signal to the right by T c -T ps1 to restore alignment with the first clock signal, where T c is the first clock Period of clk1.
在增计数N时刻前,假定已经根据要实现的高精度脉冲宽度TPS2,对第二时钟信号进行向前或向后移相TPS2,则等效PWM信号高或低电平宽度被调整为(TH/TL±TPS2(±TPS)),在新的周期开始时,将第二时钟信号右移Tc-Tps2恢复与第一时钟信号对齐,Tc为第一个时钟clk1的周期。此处占空比的变化需要考虑周期调节过程中TPS的影响,根据该值调节TPS1、TPS2的大小,来实现最终的PWM信号边沿调节效果,第一类型代表当计数器大于N,输出高电平,第二类型代表当计数器大于N,输出低电平。Before counting up the time N, assuming that the second clock signal has been phase-shifted forward or backward T PS2 according to the high-precision pulse width T PS2 to be realized, the equivalent PWM signal high or low level width is adjusted to (T H / TL ±T PS2 (±T PS )), at the beginning of a new cycle, shift the second clock signal to the right by T c -T ps2 to restore alignment with the first clock signal, where T c is the first clock Period of clk1. The change of the duty cycle here needs to consider the influence of T PS during the period adjustment process. Adjust the size of T PS1 and T PS2 according to this value to achieve the final PWM signal edge adjustment effect. The first type represents that when the counter is greater than N, the output High level, the second type means that when the counter is greater than N, the output is low level.
可选的,参见图13a-图13d,通过先减后增计数的方式来使用第一时钟信号示出调节前的PWM信号的参考波形的生成过程,在未进行任何调节的情况下,PWM信号的高电平的宽度为TH,低电平的宽度为TL。基于前述移相时刻的说明,对第二时钟信号进行前或向后移相TPS,则等效PWM信号周期实现了高精度的周期调整(TPR±TPS)。Optionally, referring to FIGS. 13 a to 13 d , the first clock signal is used to show the generation process of the reference waveform of the PWM signal before adjustment by first counting down and then increasing the count. In the case of no adjustment, the PWM signal is The width of the high level is TH and the width of the low level is TL . Based on the description of the aforementioned phase-shifting moment, the second clock signal is phase-shifted forward or backward by T PS , so that the period of the equivalent PWM signal can be adjusted with high precision (T PR ±T PS ).
在增计数为N时刻前,假定已经根据要实现的高精度脉冲宽度TPS1,对第二时钟信号进行向左或向右移相TPS1,则等效PWM信号高或低电平宽度被调整为(TH/TL±TPS1(±TPS)),在下一周期开始时,将第二时钟信号右移Tc-Tps2恢复与第一时钟信号对齐,Tc为第一个时钟clk1的周期。Before the count-up is N, it is assumed that the second clock signal has been phase-shifted to the left or right T PS1 according to the high-precision pulse width T PS1 to be realized, then the high or low level width of the equivalent PWM signal is adjusted is (T H /T L ±T PS1 (±T PS )), at the beginning of the next cycle, the second clock signal is shifted to the right by T c -T ps2 to restore alignment with the first clock signal, and T c is the first clock Period of clk1.
在减计数N时刻前,假定已经根据要实现的高精度脉冲宽度TPS2,对第二时钟信号进行向左或向右移相TPS2,则等效PWM信号高或低电平宽度被调整为(TH/TL±TPS2(±TPS)),在下一个周期开始时,将第二时钟信号右移Tc-Tps2恢复与第一时钟信号对齐,Tc为第一个时钟clk1的周期。此处占空比的变化需要考虑周期调节过程中TPS的影响,根据该值调节TPS1、TPS2的大小,来实现最终的PWM信号边沿调节效果,第一类型代表当计数器大于N,输出高电平,第二类型代表当计数器大于N,输出低电平。Before the countdown N time, it is assumed that the second clock signal has been shifted to the left or right T PS2 according to the high-precision pulse width T PS2 to be realized, the equivalent PWM signal high or low level width is adjusted to (T H / TL ±T PS2 (±T PS )), at the beginning of the next cycle, shift the second clock signal to the right by T c -T ps2 to restore alignment with the first clock signal, where T c is the first clock clk1 cycle. The change of the duty cycle here needs to consider the influence of T PS during the period adjustment process. Adjust the size of T PS1 and T PS2 according to this value to achieve the final PWM signal edge adjustment effect. The first type represents that when the counter is greater than N, the output High level, the second type means that when the counter is greater than N, the output is low level.
需要说明的是,在上述任一实施例中,第一时钟信号与第二时钟信号的频率相同,而且,在未对第二时钟信号进行移相前,二者的相位也相同。但作为一种可选的实施方式,第一时钟信号和第二时钟信号的频率可以不同,针对相同的、预期输出的PWM信号,只需要分别为第一时钟信号和第二时钟信号设置对应的预设计数值即可。It should be noted that, in any of the above embodiments, the frequencies of the first clock signal and the second clock signal are the same, and the phases of the two are also the same before the phase shift of the second clock signal is performed. However, as an optional implementation manner, the frequencies of the first clock signal and the second clock signal may be different. For the same PWM signal expected to be output, it is only necessary to set the corresponding frequency for the first clock signal and the second clock signal respectively. Pre-designed values are sufficient.
可选的,参见图14,图14是本发明实施例提供的一种PWM信号生成装置的结构框图,本实施例提供的PWM信号生成装置包括:时钟装置、相位调节装置、信号生成装置以及主控制器,其中,Optionally, referring to FIG. 14 , FIG. 14 is a structural block diagram of a PWM signal generation device provided by an embodiment of the present invention. The PWM signal generation device provided by this embodiment includes: a clock device, a phase adjustment device, a signal generation device, and a main controller, which,
时钟装置的第一输出端与信号生成装置相连;the first output end of the clock device is connected to the signal generating device;
时钟装置的第二输出端经相位调节装置与信号生成装置相连;The second output end of the clock device is connected to the signal generating device through the phase adjusting device;
主控制器分别与时钟装置、相位调节装置以及信号生成装置相连;The main controller is respectively connected with the clock device, the phase adjusting device and the signal generating device;
主控制器执行上述任一项实施例提供的PWM信号生成方法。The main controller executes the PWM signal generating method provided by any one of the above embodiments.
本发明中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The various embodiments of the present invention are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments may be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant part can be referred to the description of the method.
以上所述,仅是本发明的较佳实施例而已,并非对本发明作任何形式上的限制。虽然本发明已以较佳实施例揭露如上,然而并非用以限定本发明。任何熟悉本领域的技术人员,在不脱离本发明技术方案范围情况下,都可利用上述揭示的方法和技术内容对本发明技术方案做出许多可能的变动和修饰,或修改为等同变化的等效实施例。因此,凡是未脱离本发明技术方案的内容,依据本发明的技术实质对以上实施例所做的任何简单修改、等同变化及修饰,均仍属于本发明技术方案保护的范围内。The above descriptions are only preferred embodiments of the present invention, and do not limit the present invention in any form. Although the present invention has been disclosed above with preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art, without departing from the scope of the technical solution of the present invention, can make many possible changes and modifications to the technical solution of the present invention by using the methods and technical contents disclosed above, or modify them into equivalents of equivalent changes. Example. Therefore, any simple modifications, equivalent changes and modifications made to the above embodiments according to the technical essence of the present invention without departing from the content of the technical solutions of the present invention still fall within the protection scope of the technical solutions of the present invention.
Claims (14)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210299890.5A CN114598304A (en) | 2022-03-25 | 2022-03-25 | PWM signal generation method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210299890.5A CN114598304A (en) | 2022-03-25 | 2022-03-25 | PWM signal generation method and device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN114598304A true CN114598304A (en) | 2022-06-07 |
Family
ID=81810912
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210299890.5A Pending CN114598304A (en) | 2022-03-25 | 2022-03-25 | PWM signal generation method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114598304A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116318087A (en) * | 2022-09-09 | 2023-06-23 | 浙江地芯引力科技有限公司 | Multi-channel arbitrary phase PWM signal generation device and method |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1713095A (en) * | 2004-06-24 | 2005-12-28 | 松下电器产业株式会社 | PWM circuit control method |
| JP2007322232A (en) * | 2006-05-31 | 2007-12-13 | Canon Inc | Pulse width measuring apparatus and image forming apparatus |
| CN107346964A (en) * | 2017-06-09 | 2017-11-14 | 中国电子科技集团公司第四十研究所 | A kind of high-speed pulse signal pulsewidth precise control circuit and control method with self-calibration function |
| US20200321872A1 (en) * | 2019-04-03 | 2020-10-08 | Alpha And Omega Semiconductor (Cayman) Limited | Phase multipliers in power converters |
| CN112751553A (en) * | 2019-10-29 | 2021-05-04 | 意法半导体股份有限公司 | PWM signal generator circuit and related integrated circuit |
| CN112787638A (en) * | 2020-12-28 | 2021-05-11 | 苏州大学 | Double-channel synchronous multiple loading pulse generation method |
-
2022
- 2022-03-25 CN CN202210299890.5A patent/CN114598304A/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1713095A (en) * | 2004-06-24 | 2005-12-28 | 松下电器产业株式会社 | PWM circuit control method |
| JP2007322232A (en) * | 2006-05-31 | 2007-12-13 | Canon Inc | Pulse width measuring apparatus and image forming apparatus |
| CN107346964A (en) * | 2017-06-09 | 2017-11-14 | 中国电子科技集团公司第四十研究所 | A kind of high-speed pulse signal pulsewidth precise control circuit and control method with self-calibration function |
| US20200321872A1 (en) * | 2019-04-03 | 2020-10-08 | Alpha And Omega Semiconductor (Cayman) Limited | Phase multipliers in power converters |
| CN112751553A (en) * | 2019-10-29 | 2021-05-04 | 意法半导体股份有限公司 | PWM signal generator circuit and related integrated circuit |
| CN112787638A (en) * | 2020-12-28 | 2021-05-11 | 苏州大学 | Double-channel synchronous multiple loading pulse generation method |
Non-Patent Citations (2)
| Title |
|---|
| CHANGYONG ZHANG: "Implement of PWM Pulse Generator Based CPLD for Cascadedmultilevel Converter", 2007 INTERNATIONAL CONFERENCE ON MACHINE LEARNING AND CYBERNETICS, 29 October 2007 (2007-10-29) * |
| 王珏;曾云;: "基于FPGA实现的多路PWM设计", 中国水运(下半月), no. 10, 20 October 2008 (2008-10-20) * |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116318087A (en) * | 2022-09-09 | 2023-06-23 | 浙江地芯引力科技有限公司 | Multi-channel arbitrary phase PWM signal generation device and method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4787712B2 (en) | PWM signal generation circuit and power supply device including the same | |
| US7562246B2 (en) | Phase controllable multichannel signal generator | |
| US8860483B2 (en) | Pulse width modulation signal generation circuit and pulse width modulation signal generation method | |
| US6137336A (en) | Circuit and method for generating multiphase clock | |
| WO2023184851A1 (en) | Duty cycle calibration circuit and method, chip, and electronic device | |
| CN114598304A (en) | PWM signal generation method and device | |
| US10886900B2 (en) | Multi-phase multi-frequency pulse width modulation | |
| CN103138560A (en) | Frequency jitter system | |
| CN116707497B (en) | Tunable low-speed clock duty cycle skew trimming circuit, method and timing circuit | |
| US8018263B2 (en) | Pulse generating circuit and pulse width modulator | |
| JP2004528780A (en) | Digital-to-analog converter | |
| JP5303762B2 (en) | Waveform processing circuit. | |
| US9692403B2 (en) | Digital clock-duty-cycle correction | |
| JP5303761B2 (en) | Timing generation circuit and phase shift circuit | |
| JP6483329B2 (en) | High-speed programmable clock divider | |
| US20040027181A1 (en) | Clock multiplying PLL circuit | |
| CN112510975A (en) | Method and system for improving PWM precision of accelerator power supply | |
| Sabarinath et al. | Design and implementation of FPGA based high resolution digital pulse width modulator | |
| JP2010028244A (en) | Hysteresis comparator circuit and delay circuit using the same | |
| JP5303757B2 (en) | Timing generator | |
| JP2000092851A (en) | PWM type rotating machine controller | |
| CN114172494B (en) | Clock signal delay circuit | |
| JP2013062668A (en) | Phase adjustment circuit with duty correction, and serializer | |
| CN116488435A (en) | Multiphase power supply and control circuit thereof | |
| Carosa et al. | Implementation of a 16 Phase Digital Modulator in a 0.35/spl mu/m Process |
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 |