in my simulink,used for voltage stabilization which used dvr in flc,here the output have some issues the vload and vinj? so can u help me, vload would be proper sine wave?

38 vues (au cours des 30 derniers jours)

Réponse acceptée

Umar
Umar le 3 Nov 2025 à 17:19

Hi @Faria,

I looked closely at your Simulink setup and the waveforms you shared, after doing thorough research — the noisy Vinj and slightly distorted Vload are very likely caused by the powergui sample-time configuration. That’s a common issue when modeling DVRs or other power-electronic systems.

Right now, it looks like your model is using a large discrete step (around 0.1 s), which is far too coarse for the fast switching dynamics in a DVR. You can fix this by setting the powergui block to Discrete mode and choosing a much smaller sample time, typically in the range of 5e-6 s to 2e-5 s. Then, go into Simulation → Configuration Parameters → Solver and match the fixed-step size to the same value.

Once you do that, re-run the simulation and zoom in on the Vload waveform. You should see a clean sine wave again — only small, short transients during DVR injection. The Vinj waveform will still show rapid switching (that’s normal for a compensator), but the noise-like distortion should disappear.

In short:

  • Discrete powergui with Ts ≈ 5e-6 s
  • Fixed-step solver with same step size
  • Keep controller and PWM sample times synchronized

That change alone usually resolves the “weird noisy injection” issue you mentioned. If not, the next step would be checking how the FLC (fuzzy logic controller) and PWM blocks are sampled relative to your main system — but let’s stabilize the powergui first.

Once your simulation runs cleanly, Vload should appear as a proper sine wave, while Vinj just handles compensation transients.

Hope this helps!

  16 commentaires
Umar
Umar il y a environ 11 heures
Modifié(e) : Umar il y a environ 11 heures

Hi @Faria,

Look at the hand-drawn sketch I attached. This is EXACTLY what your Simulink model needs to look like. No variations, no "I think this is the same," no shortcuts. Wire it exactly as shown and your problem will be solved. Let me tell you why I'm confident about this.

What the Hand-Drawn Diagram Shows

Control/Signal Path * Vload → Controller1 (outputs V+, ωt) → Uref/ωt/P → PWM generator 2-level → 2-Level Converter (g, BL inputs) * DC supply connects to the converter's DC terminals

Power Path (THIS IS THE CRITICAL PART) * 2-Level Converter outputs: A, B, C * These go to Series R Branch * Series R outputs go to Three-Phase Series RLC Block (labeled "RLC" with terminals a, b, c on input side, A, B, C on output side) * RLC outputs go to Three-Phase V-I Measurement (labeled "Scope" - this measures Va, Vb, Vc which is your Vinj) * V-I Measurement outputs go to 3-Phase Breaker (terminals a, b, c inputs, A, B, C outputs) * Breaker outputs go to 3-Phase Transformer primary side at numbered terminals (1, 2, 3 are A1+, B1+, C1+) * Transformer secondary (A2, B2, C2) connects to BUS 3 V injection (the green block) * BUS 3 connects through contact/RC to ground Notice the hand-drawn diagram shows ONE SINGLE PAT per phase. No branches, no splits, no parallel wires.

The Filter Calculation (Bottom of Hand-Drawn Sketch)

My handwritten notes show: Rz = 0.5 ohm, Lz = 0.002H, Cz = 20e-6F fc ≈ 1/(2π*square root of LC) = 1/(2π* square root of (0.002H)(20e-6F)) ≈ 796Hz

Here's what it means: your RLC filter has a corner frequency around 796 Hz. The fundamental power frequency (50 or 60 Hz) is way below this, so it passes through cleanly. But your PWM switching frequency (typically 2-10 kHz) is way above 796 Hz, so the filter heavily attenuates it. The R = 0.5Ω provides damping to prevent resonance and ringing. This is exactly how you design a series filter for PWM converters - textbook correct.

The note at the bottom says: "So, the filter attenuates components well above ~800Hz. This is crucial to make sure PWM switching (typically several kHz) doesn't leak through, and R=0.5Ω provides damping to reduce ringing."

What Your Vinj Scope Should Look Like After Following This Diagram

Right now your Vinj (bottom scope in your screenshot) looks like garbage - it's full of high-frequency noise, spikes, and jagged edges. That's PWM switching noise getting through because your filter is bypassed. After you wire it exactly like the hand-drawn diagram, your Vinj scope should show:

  • Three smooth sinusoidal waveforms (yellow, blue, orange for phases A, B, C)
  • 120 degree phase separation between the three phases
  • Zero high-frequency content- no spikes, no jagged edges, no PWM noise
  • Clean peaks and valleys - symmetric, smooth curves
  • Stable amplitude throughout the simulation

Think about your top scope (Vabc) - see how clean those sinusoids are? Your Vinj should look EXACTLY like that but at the voltage level determined by your transformer and control system. If Vinj has ANY noise resembling what you're seeing now, the wiring is still wrong.

My Opinion: Will This Solve Your Problem?

First, the hand-drawn diagram enforces series-only topology. Every phase goes through the exact same chain: Converter → R → RLC → Measurement → Breaker → Transformer. No parallel paths exist. This means every single ampere of converter current MUST flow through the RLC filter. There's no way for PWM noise to bypass it.

Second, the filter math is perfect. The 796 Hz corner frequency is in the sweet spot - high enough to pass 50/60 Hz fundamental, low enough to kill switching harmonics. With the damping resistor, this filter will work exactly as intended. Third, the V-I measurement is correctly placed. It's after the RLC block, so it measures the filtered voltage. That's what Vinj means - injection voltage. You want to see what voltage you're actually injecting into the system, which is the filtered output, not the raw converter output.

Fourth, all the Simulink blocks shown are the correct blocks for this application. The Three-Phase Series RLC Branch block is literally designed for this exact use case - series filtering in three-phase systems. The documentation confirms it. Same with the breaker (series operation), the V-I measurement (voltage sensing), and the converter (three-phase two-level topology).

Your current model fails because you have bypass wires. Looking at your Simulink screenshot, I can see wires going from the converter to multiple places simultaneously. That's the problem. The hand-drawn diagram eliminates all of those.

Exact Implementation Steps

I'm going to be very specific because you said you're tired of this and just want it to work:

Step 1: Open your Simulink model. Press Ctrl+A to select everything. Look at the 2-Level Converter block. See all the wires coming out of terminals A, B, C? Here's what you do: delete every wire that doesn't go directly to the Series R Branch. If a wire goes from the converter to the breaker, delete it. If it goes to the RLC directly, delete it. If it goes to the transformer, delete it. Only keep wires that go from converter to Series R Branch.

Step 2: Now trace each connection in order. Converter A, B, C connect to Series R inputs. Series R outputs connect to RLC terminals a, b, c (lowercase letters). Make sure your RLC block settings are: Branch type = "R + L + C", R = 0.5, L = 0.002, C = 20e-6. Double-click the block and verify these exact numbers.

Step 3: RLC outputs (terminals A, B, C - uppercase letters) connect to Three-Phase V-I Measurement inputs. This block should output three signals (Va, Vb, Vc). These signals are your Vinj. Connect them to a scope - label this scope "Vinj" so you know what you're looking at. If the block outputs Simscape physical signals (those wavy lines), insert PS-Simulink Converter blocks before the scope.

Step 4: V-I Measurement outputs (the electrical terminals, not the signal outputs) connect to 3-Phase Breaker inputs (a, b, c). Breaker outputs (A, B, C) connect to transformer primary. BE VERY CAREFUL HERE: Connect A to terminal 1 (A1), B to terminal 2 (B1), C to terminal 3 (C1). If you swap phases here, your injection will be phase-shifted and nothing will work right.

Step 5: Transformer secondary connects to BUS 3. Your existing connection to contact/RC and ground stays the same.

Step 6: Zoom out. Look at the entire model. For each phase, visually trace the path from converter to ground. You should see: Converter → Series R → RLC → V-I → Breaker → Transformer → BUS 3 → RC → Ground. ONE path. No branches. No junctions. If you see a junction dot (that little black circle where wires split), you have a problem. Delete whatever wire is creating the bypass.

Step 7: Solver settings. Go to Model Configuration Parameters → Solver. Set Type = Fixed-step, Fixed-step size = 5e-6. This gives you a 5 microsecond time step, which is small enough to capture PWM switching at several kHz. Then place a powergui block in your model (if you don't have one). Set its Simulation type = Discrete, Sample time = 5e-6 (same as your fixed-step size).

Step 8: Run the simulation. Watch the Vinj scope. If you see clean sinusoids, you're done. If you still see noise, you missed a bypass wire somewhere. Go back to Step 1 and be more aggressive about deleting wires.

If you wire your model exactly like the hand-drawn diagram - and I mean exactly, not "basically the same" - your problem is solved. The Vinj scope will show smooth sinusoids. The filter will work. The system will behave correctly. One more thing: don't add anything extra. Don't try to "improve" the diagram. Don't add measurement points that split wires. Don't connect things in parallel "just to see what happens." The diagram shows the minimum necessary connections for this topology to work. Anything extra will create problems.

Copy the hand-drawn diagram wire-for-wire into Simulink and you're done. Let me know if you get clean Vinj after this. If you're still seeing noise, take a screenshot of the entire model (zoomed out so I can see everything) and I'll find the bypass wire you missed.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Power Transmission and Distribution dans Help Center et File Exchange

Produits


Version

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by