SPWM waveform generation method, waveform generator and inverter system
By calculating the number of high and low levels of transmission times and delay time by preset angle parameters, SPWM waveforms are generated, and the control signals are transmitted through optical fibers, the problems of insufficient SPWM technology complexity and anti-interference ability in the existing technology are solved, and the inverter is realized Simplified and efficient control of the system.
Patent Information
- Application Number
- CN202411556827.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-11-04
AI Technical Summary
The existing SPWM technology has complex circuit structure, high cost, noise and distortion problems, and is sensitive to electromagnetic interference, which limits the performance and reliability of the inverter system.
Preset angle parameters are used to calculate the number of high and low levels of transmission times and delay time, and SPWM waveforms are generated through simple calculations, and control signals are transmitted through optical fibers to improve anti-interference ability, simplify the circuit structure and reduce costs.
The circuit structure is simplified, the cost is reduced, the system's anti-electromagnetic interference ability and flexibility is improved, the waveform is sinusoidal characteristics and precise control are ensured, and the system's adaptability and reliability are enhanced.
Smart Images

Figure CN119210194A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power electronics, and in particular to an SPWM waveform generating method, an SPWM waveform generator and an inverter system. Background Art
[0002] In modern power electronic systems, the inverter is a key device that converts DC power into AC power. The performance of the inverter directly affects the efficiency and output quality of the entire system. Currently, sinusoidal pulse width modulation (SPWM) technology is widely used in inverter control to produce high-quality sinusoidal wave output.
[0003] Traditional SPWM technology usually requires real-time comparison between carrier and modulated waves, which requires complex hardware circuits and precise analog signal processing, which not only increases the complexity and cost of the system, but also may introduce noise and distortion, affecting the quality of the output waveform.
[0004] In addition, existing SPWM implementation methods often rely on high-performance digital signal processors (DSPs) or complex application-specific integrated circuits (ASICs), which limits the flexibility of the system and makes it difficult to quickly adjust and optimize it according to different application scenarios.
[0005] In practical applications, inverter systems also face the challenge of electromagnetic interference. Traditional control signal transmission methods are easily affected by external electromagnetic interference, resulting in reduced control accuracy and even possible system malfunctions.
[0006] These problems lead to the shortcomings of existing SPWM technology in terms of simplicity of implementation, cost-effectiveness and anti-interference ability, which limits the performance and reliability of the inverter system in various application scenarios. Summary of the invention
[0007] The object of the present invention is to provide an SPWM waveform generating method, an SPWM waveform generator and an inverter system to solve the problems of complex structure and high cost of the SPWM waveform generating circuit in the prior art.
[0008] To achieve the above object, the present invention provides a SPWM waveform generation method, comprising the following steps:
[0009] Acquire parameters of multiple preset angles, the parameters including B value and A value; calculate the high and low level transmission times and delay times corresponding to the multiple preset angles according to the parameters; send a control signal to the inverter circuit according to the high and low level transmission times and delay times.
[0010] Furthermore, the step of calculating the number of high and low level transmissions and the delay time according to the parameters includes: using the formula Y=B+A*SIN(Φ) to calculate the parameter value Y, where Φ is a preset angle; calculating the number of high level transmissions N_high and the number of low level transmissions N_low according to the Y value; calculating the number of high level transmissions N_high=Y / 90; calculating the number of low level transmissions N_low=400-N_high.
[0011] Specifically, the step of calculating the delay time includes: calculating the high level delay time = (N_high-floor (N_high)) * fixed period; calculating the low level delay time = (N_low-floor (N_low)) * fixed period; wherein floor represents a rounding-down function.
[0012] Furthermore, the method further comprises the step of: when the calculated number of transmissions is less than a preset threshold, setting the number of transmissions to the preset threshold and increasing the delay time accordingly.
[0013] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the above-mentioned SPWM waveform generation method are implemented.
[0014] The present invention also provides an SPWM waveform generator, comprising:
[0015] A parameter acquisition module, used to acquire parameters of multiple preset angles, wherein the parameters include a B value and an A value;
[0016] A calculation module, used to calculate the high and low level transmission times and delay times corresponding to a plurality of preset angles according to the parameters;
[0017] The signal sending module is used to send a control signal to the inverter circuit according to the high and low level sending times and the delay time.
[0018] Furthermore, the calculation module is specifically used for:
[0019] The parameter value Y is calculated using the formula Y=B+A*SIN(Φ), where Φ is the preset angle;
[0020] Calculate the high level sending times and low level sending times according to the Y value;
[0021] Calculate the high level delay time = (N_high-floor(N_high))*fixed period;
[0022] Calculate the low level delay time = (N_low-floor(N_low))*fixed period;
[0023] Calculate the number of high level transmissions N_high=Y / 90; calculate the number of low level transmissions N_low=400-N_high;
[0024] Among them, floor represents the rounding down function, N_high represents the number of high-level transmissions, and N_low represents the number of low-level transmissions.
[0025] Furthermore, the calculation module is also used for:
[0026] When the calculated number of transmissions is less than a preset threshold, the number of transmissions is set to the preset threshold, and the delay time is increased accordingly.
[0027] In addition, the SPWM waveform generator also includes a clock module, which is used to provide a clock signal with a fixed period for the signal sending module.
[0028] The present invention also provides an inverter system, comprising: the above-mentioned SPWM waveform generator; a microcontroller connected to the SPWM waveform generator; an inverter circuit connected to the microcontroller, used to receive a control signal sent by the SPWM waveform generator through the microcontroller and perform an inverter operation according to the control signal.
[0029] The SPWM waveform generation method, SPWM waveform generator and inverter system provided by the present invention can generate SPWM waveforms through pre-stored parameters and simple calculations, without complex carrier and modulation wave comparison circuits, greatly simplifying the circuit structure and reducing system complexity and cost. At the same time, the control signal is sent in a fixed period and delay compensation is performed to ensure the sinusoidal characteristics and precise control of the waveform. When the number of transmissions is less than a preset threshold, the stability of the control signal is further ensured by setting a minimum number of transmissions and increasing the delay time.
[0030] In addition, the SPWM waveform generator of the present invention adopts optical fiber to transmit control signals, which greatly improves the anti-electromagnetic interference ability of the system and is suitable for harsh electromagnetic environments. Flexible control is achieved through a microcontroller, and system parameters can be quickly adjusted according to different application requirements, which improves the flexibility and adaptability of the system. The integrated design of the inverter system simplifies the overall structure, is easy to implement and maintain, and at the same time ensures high-quality output waveforms, effectively reduces harmonic content, and improves system efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 is a flow chart of a SPWM waveform generating method in one embodiment of the present invention;
[0032] Figure 2 Schematic diagram of the SPWM waveform cycle in one embodiment of the present invention;
[0033] Figure 3 is a structural block diagram of an SPWM waveform generator in one embodiment of the present invention;
[0034] Figure 4 1 is a structural block diagram of an inverter system in one embodiment of the present invention.
[0035] In the figure: 1. parameter storage module, 2. calculation module, 3. signal sending module, 4. clock module. DETAILED DESCRIPTION
[0036] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the described embodiments are only used to explain the technical principles of the present invention, rather than to limit the scope of protection thereof. Those skilled in the art should understand that, without departing from the spirit and scope of the present invention, various changes, modifications or equivalent substitutions may be made to these embodiments. These changes, modifications or equivalent substitutions shall all be deemed to fall within the scope of protection defined by the claims of the present invention.
[0037] like Figure 1 As shown, the present invention provides a SPWM waveform generation method, comprising the following steps:
[0038] S1: Obtain parameters of multiple preset angles. The parameters include B value and A value, which are pre-stored in the parameter storage module. In this embodiment, 10 key angle points are selected, namely 0°, 36°, 72°, 108°, 144°, 180°, 216°, 252°, 288° and 324°. The B value and A value corresponding to each angle point are obtained through experimental optimization and stored in the parameter storage module. For this embodiment, the A and B values are both 18000. This selection simplifies the calculation process while ensuring the symmetry and accuracy of the SPWM waveform.
[0039] It is worth noting that the present invention is not limited to the above specific embodiments. In other possible implementations, the system can be adjusted and optimized in various ways according to actual needs. For example, the A and B values can be dynamically adjusted to adapt to different load conditions or output requirements, thereby optimizing the output of the SPWM waveform in real time. Another possible variant is to use different A and B values, such as A value of 18000 and B value of 19000, so that an SPWM waveform with a specific bias can be generated.
[0040] S2: Calculate the number of high and low level transmissions and delay times corresponding to multiple preset angles according to the parameters. The specific calculation process is as follows:
[0041] a) Calculate the parameter value Y using the formula Y=B+A*SIN(Φ), where Φ is the preset angle.
[0042] b) Calculate the high level transmission times N_high and the low level transmission times N_low according to the Y value. The calculation formula is:
[0043] N_high=Y / 90
[0044] N_low=400-N_high
[0045] Table 1 SPWM waveform generation key angle high and low level transmission times table
[0046] angle B A 0° 200 200 36° 317 82 72° 390 10 108° 390 10 144° 317 82 180° 200 200 216° 82 317 252° 9 390 288° 9 390 324° 82 317
[0047] c) Calculate the high level delay time and low level delay time:
[0048] High level delay time = (N_high-floor(N_high))*fixed period
[0049] Low level delay time = (N_low-floor(N_low))*fixed period
[0050] Wherein, floor represents a round-down function, and in a specific embodiment, the fixed period is 5 μs. In another embodiment, the fixed period is an adjustable period, and its adjustment range is 0.5 μs to 20 μs.
[0051] S3: Send a control signal to the inverter circuit according to the high and low level transmission times and the delay time. Figure 2 As shown, in a complete SPWM waveform cycle, high level and low level appear alternately, the duration of each level is determined by the number of transmissions, and there is a delay time after each level ends.
[0052] Specifically, taking the 36° angle as an example:
[0053] S1: B = 18000, A = 18000;
[0054] S2:Y=18000+18000*SIN(36*π / 180)≈28580.68;
[0055] N_high=28580.68 / 90≈317.56;
[0056] N_low = 400 - 317.56 = 82.44;
[0057] S3: The actual number of high-level transmissions = floor(317.56) = 317;
[0058] High level delay time = (317.56-317)*250≈140ns;
[0059] The actual number of low level transmissions = floor(82.44) = 82;
[0060] Low level delay time = (82.44-82)*250≈110ns.
[0061] In practical applications, when the calculated number of transmissions is less than a preset threshold (eg, 10), the number of transmissions is set to the preset threshold, and the delay time is increased accordingly to ensure the stability of the control signal.
[0062] The SPWM waveform generation method can generate the SPWM waveform through pre-stored parameters and simple calculations, without complex carrier and modulation wave comparison circuits, greatly simplifying the circuit structure. At the same time, by sending control signals at a fixed period and performing delay compensation, the sinusoidal characteristics and precise control of the waveform are guaranteed.
[0063] The SPWM waveform generation method of the present invention has the following beneficial effects:
[0064] 1. The circuit structure is simplified, and there is no need for carrier and modulation wave comparison circuits, which reduces system complexity and cost.
[0065] 2. The SPWM waveform can be generated by pre-storing parameters and simple calculations, which improves the response speed and efficiency of the system.
[0066] 3. Use fixed cycle to send commands and perform delay compensation to ensure the sinusoidal characteristics of the waveform and precise control.
[0067] 4. The system can be flexibly adapted to different application scenarios by adjusting pre-stored parameters, which improves the flexibility and adaptability of the system.
[0068] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
[0069] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the above-mentioned SPWM waveform generation method are implemented. The computer-readable storage medium can be a non-volatile memory such as a flash memory, EEPROM, EPROM, ROM, or a volatile memory such as a RAM. The computer program can be written in a programming language such as C language and assembly language, and its specific implementation belongs to the conventional means of those skilled in the art and will not be repeated.
[0070] The present invention also provides a SPWM waveform generator, such as Figure 3As shown, the SPWM waveform generator of the present invention comprises:
[0071] The parameter storage module 1 is used to store parameters of multiple preset angles. The parameter storage module 1 can be an EEPROM or a Flash memory, which is used to store parameters such as B value and A value.
[0072] The calculation module 2 is used to calculate the high and low level transmission times and delay times corresponding to multiple preset angles according to the parameters. The calculation module 2 can be a microcontroller or FPGA, which is used to execute the calculation steps in the above SPWM waveform generation method.
[0073] The signal sending module 3 is used to send a control signal to the inverter circuit according to the high and low level sending times and the delay time. The signal sending module 3 includes an optical fiber sending unit 6, which is used to convert the electrical signal into an optical signal and transmit it through an optical fiber to improve the anti-electromagnetic interference capability.
[0074] The clock module 4 is used to provide a fixed-period clock signal for the signal sending module 3. The clock module 4 may be a crystal oscillator circuit or a PLL circuit, which is used to generate a stable clock signal to ensure that the sending period of the control signal is accurate.
[0075] The calculation module 2 is specifically used for:
[0076] a) Calculate the parameter value Y using the formula Y=B+A*SIN(Φ), where Φ is the preset angle;
[0077] b) Calculate the number of high level transmission times N_high and the number of low level transmission times N_low according to the Y value;
[0078] c) Calculate the high level delay time and the low level delay time.
[0079] The specific implementation of these calculation steps is the same as the description in the above SPWM waveform generation method.
[0080] The present invention also provides an inverter system, such as Figure 4 As shown, the inverter system of the present invention comprises:
[0081] The SPWM waveform generator is used to generate an SPWM control signal.
[0082] A microcontroller (MCU) is connected to the SPWM waveform generator and is used to receive a control signal sent by the SPWM waveform generator through an optical fiber and control the operation of the inverter circuit.
[0083] The inverter circuit is connected to the microcontroller and is used to receive the control signal sent by the SPWM waveform generator through the microcontroller and perform an inverter operation according to the control signal. The inverter circuit includes four power switching devices (such as IGBTs or MOSFETs) to form a full-bridge inverter circuit structure.
[0084] The output terminals A and B are connected to the output terminals of the inverter circuit and are used to output the inverted alternating current.
[0085] The DC power supply (CD) provides a DC input voltage for the inverter circuit.
[0086] The inverter system of the present invention has the following beneficial effects:
[0087] 1. The use of optical fiber to transmit control signals greatly improves the system's ability to resist electromagnetic interference and is suitable for harsh electromagnetic environments.
[0088] 2. Flexible control is achieved through the microcontroller, and system parameters can be quickly adjusted according to different application requirements.
[0089] 3. Simple structure, easy to implement and maintain.
[0090] 4. The full-bridge inverter circuit structure can achieve high-efficiency DC to AC conversion.
[0091] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A SPWM waveform generation method, characterized in that: The following steps are involved: Acquire parameters of multiple preset angles, wherein the parameters include a B value and an A value; Calculate the number of high and low level transmissions and delay times corresponding to multiple preset angles according to the parameters; A control signal is sent to the inverter circuit according to the high and low level sending times and the delay time.
2. The method according to claim 1, characterized in that The step of calculating the number of high and low level transmissions and the delay time according to the parameters comprises: The parameter value Y is calculated using the formula Y=B+A*SIN(Φ), where Φ is the preset angle; Calculate the number of high level transmissions N_high = Y / 90; Calculate the number of low level transmissions N_low = 400-N_high; Among them, N_high represents the number of high-level transmissions, and N_low represents the number of low-level transmissions.
3. The method according to claim 2, characterized in that The step of calculating the delay time comprises: Calculate the high level delay time = (N_high-floor(N_high))*fixed period; Calculate the low level delay time = (N_low-floor(N_low))*fixed period; Among them, floor represents the rounding down function.
4. The method according to claim 1, characterized in that Also includes the steps: When the calculated number of transmissions is less than a preset threshold, the number of transmissions is set to the preset threshold, and the delay time is increased accordingly.
5. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the steps of the SPWM waveform generating method according to any one of claims 1 to 4 are implemented.
6. An SPWM waveform generator, characterized in that: include: A parameter acquisition module, used to acquire parameters of multiple preset angles, wherein the parameters include a B value and an A value; A calculation module, used to calculate the high and low level transmission times and delay times corresponding to a plurality of preset angles according to the parameters; The signal sending module is used to send a control signal to the inverter circuit according to the high and low level sending times and the delay time.
7. The SPWM waveform generator according to claim 6, characterized in that: The calculation module is specifically used for: The parameter value Y is calculated using the formula Y=B+A*SIN(Φ), where Φ is the preset angle; Calculate the number of high level transmissions N_high = Y / 90; Calculate the number of low level transmissions N_low = 400-N_high; Calculate the high level delay time = (N_high-floor(N_high))*fixed period; Calculate the low level delay time = (N_low-floor(N_low))*fixed period; Among them, floor represents the rounding down function, N_high represents the number of high-level transmissions, and N_low represents the number of low-level transmissions.
8. The SPWM waveform generator according to claim 6, characterized in that: The calculation module is also used for: When the calculated number of transmissions is less than a preset threshold, the number of transmissions is set to the preset threshold, and the delay time is increased accordingly.
9. The SPWM waveform generator according to claim 6, characterized in that: It also includes a clock module, which is used to provide a clock signal with a fixed period for the signal sending module.
10. An inverter system, characterized in that: include: The SPWM waveform generator as claimed in any one of claims 6 to 9; A microcontroller connected to the SPWM waveform generator; The inverter circuit is connected to the microcontroller and is used for receiving the control signal sent by the SPWM waveform generator through the microcontroller and performing an inverter operation according to the control signal.
Citation Information
Patent Citations
Unipolarity sinusoidal pulse width modulation (SPWM) pulse signal achieving method based on field programmable gate array (FPGA)
CN104202023A
Method for realizing SPWM (Sinusoidal Pulse Width Modulation) waveform based on digital processor
CN106155177A
Carrier-wave SPWM waveform generation method based on digital processor
CN108919880A
Modulation and coding strategy scheduling method and device, communication equipment and storage medium
CN112636875A
Sinusoidal PWM waveform generator
JP1985190170A
