How to get waveform from the given magnitude and phase?

10 views (last 30 days)
I want to get the waveform from the given magnitude & phase or in the complex form in simulation. Please anyone give me solution for this.
  6 Comments
KRANTHI
KRANTHI on 14 Jan 2014
i need to get the fundamental component extraction from unbalanced load currents. But my source voltages are inform of wave forms( means i may get magnitude from it but i'm not getting phase of waveform) but the calculation for extraction calculations are in polar and exponential form .
KRANTHI
KRANTHI on 14 Jan 2014
simulation means in modelling but not in coding

Sign in to comment.

Answers (1)

Hari
Hari on 11 Jun 2025
Hi,
I understand that you are trying to extract the fundamental component from unbalanced load currents in a simulation environment. You have the source voltages in waveform form, which allows you to obtain magnitudes, but you are unsure how to retrieve or handle the phase information, which is essential for calculations in polar or exponential form.
I assume that your simulation gives you time-domain voltage waveforms, and you want to analyze these signals to obtain their phasor (magnitude and phase) representations, particularly the fundamental frequency components.
In order to extract the fundamental component (both magnitude and phase) from the waveform, you can follow the below steps:
Step 1: Sample your voltage waveform over at least one full cycle of the fundamental frequency.
This ensures accurate extraction of the fundamental frequency component using Fourier techniques.
Step 2: Apply a Discrete Fourier Transform (DFT) or Fast Fourier Transform (FFT) to the sampled waveform.
This gives you the complex spectrum, from which the magnitude and phase of the fundamental can be extracted.
Step 3: Identify the fundamental frequency bin from the FFT output.
For example, if your fundamental frequency is 50 Hz, and your sampling frequency is 1 kHz, then the 50 Hz component corresponds to index (50/1000)*N, where N is the FFT length.
Step 4: Extract the complex value at the fundamental frequency index.
This complex value represents the phasor of the fundamental component. Its magnitude is the amplitude, and the angle (using angle() function) gives the phase.
Step 5: Convert the phasor back to the time domain if needed.
You can reconstruct the waveform using the inverse of Euler's identity: A*cos(ωt + φ), where A is the magnitude and φ is the phase.
References:
Hope this helps!

Community Treasure Hunt

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

Start Hunting!