How to simulate an inverter welding machine?
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
0 votes
Share a link to this question

Accepted Answer
0 votes
Hi @Huang,
Thank you for sharing your Simulink model of the inverter welding machine. I've reviewed your diagram thoroughly and identified several areas that may be causing the unexpected output behavior.
Architecture Assessment:
Your basic topology follows the correct sequence (transformer -> primary rectifier ->inverter switching -> secondary rectifier -> LC filtering), which is sound. However, there are critical implementation aspects that require attention:
Primary Concerns:
PWM Control System: The inverter stage requires high-frequency PWM generation (typically 20-100 kHz) with proper gating signals for the switching elements. The current diagram doesn't clearly show the PWM controller configuration, which is essential for proper operation.
Solver Configuration: Power electronics simulations involve stiff differential equations. I recommend switching from the default solver (ode45) to a stiff solver such as ode23tb or ode15s in your Configuration Parameters. Additionally, set a maximum step size of 1e-6 or smaller to accurately capture switching transients.
1. Control Loop: Welding machines require constant current regulation. You'll need to implement feedback control from the output current to dynamically adjust the PWM duty cycle based on welding requirements. 2. Dead-Time Implementation: Ensure complementary switching pairs have adequate dead-time (typically 1-3 μs) to prevent shoot-through conditions that could damage the IGBTs/MOSFETs.
Here are my recommended actions that I would like you to take into account.
- Verify the powergui block is configured for "Discrete" mode with an appropriate sample time
- Add scope blocks to monitor PWM signals and confirm they're generating at the intended frequency
- Implement snubber circuits across switching devices to suppress voltage spikes
- Review initial conditions for all energy storage elements (capacitors and inductors)
- Validate your load model (arc resistance and inductance characteristics)
Now, in order to provide more specific guidance, could you describe the output issues you're experiencing? (e.g., voltage/current levels incorrect, oscillations, convergence errors, or no output signal)
However, I'm confident these adjustments will resolve the simulation issues. Please feel free to reach out if you need clarification on any of these recommendations.
Hope this helps.
5 Comments

Hi @Huang,
Your waveforms show a severely underdamped LC filter response with ~55% overshoot (70V instead of 45V) and prolonged oscillations. The primary up issues are:
1. LC Filter Resonance - Your output filter is oscillating at its natural frequency without sufficient damping 2. Improper Control Strategy - Welding machines require current-mode control, not voltage control 3. Simulation Settings - Likely using default solver (ode45) which is inadequate for power electronics
So, this is what I will propose:
Step 1: Fix Simulation Settings (Critical) * Solver: Change to ode23tb in Configuration Parameters * Max step size: 1e-6 seconds * Relative tolerance: 1e-4 * powergui block: Set to "Discrete" mode, sample time 2e-6
Step 2: Add LC Filter Damping * Insert a 0.3Ω resistor in series with your output capacitor * This will eliminate 70-80% of the oscillations * Calculate optimal value: Rd = 0.5 × √(L/C) for critical damping
Step 3: Implement Current-Mode Control * Restructure control to regulate current (100A), not voltage * Use PI controller: Kp = 0.02, Ki = 20 (starting values) * Enable anti-windup with limits [0, 0.95] * Add soft-start ramp: 0 ->100A over 100ms to eliminate overshoot
Step 4: Verify Component Values For 4.5kW output (45V × 100A) * Output inductor: 100µH, rated ≥150A saturation * Output capacitor: 1000µF, low ESR, ≥63V rating * Load model: Should include inductance (50-100µH) for realistic arc characteristics
So after implementation of these fixes, you should observe the following: * Smooth ramp-up with no overshoot * Settling time <150ms * Steady-state accuracy: 100A ± 1A, 45V ± 0.5V * Minimal ripple (<2%)
Start with Step 1 (simulation settings) and Step 2 (damping resistor) - these alone should dramatically improve your results. Then proceed to Steps 3 and 4 for proper welding machine operation.
The combination of incorrect solver settings, undamped LC filter, and voltage-mode control (instead of current-mode) is causing your issues. These are common mistakes in power electronics simulations.
Let me know how it goes.






Hi @Huang,
Please share current waveform of the process, that will definitely help to determine what part is wrong and also updated Simulink block diagram. I will look forward to your response. If there is a delay in response it will be because I am working late. You are making progress which is good.
Hi @Huang,
I did not hear back from you for a while. Hope you have made some progress. Let me know if you need any help further.
More Answers (0)
Categories
Find more on Pulse and Transition Metrics in Help Center and File Exchange
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)