EIS impedance calculation from measured data
126 views (last 30 days)
Show older comments
Ruben Messner
on 16 Aug 2023
Commented: Florian Bittner
on 21 Sep 2023
Hi,
I want to create a EIS nyquist plot for a measured fuel cell. I excited it with a squarewave and measured voltage and current in time domain. How could I calculate a nyquist plot out of this? I tried to use FFT but the results are not plausible.
impedance = voltage_fft./current_fft;
figure;
plot(real(impedance), imag(impedance));
Appreciate any help, thx in advance!
Ruben
1 Comment
Florian Bittner
on 21 Sep 2023
Hi Ruben, is there a chance to share your final code including filter ? Im trying to create Nyquistplots for validation purpose. But my Nyquistplot looks really useless. Aim of my investigations is to find a way to extract model parameter for battery characterisation. But even this isnt working yet. Thanks.
Accepted Answer
Ruchika
on 16 Aug 2023
Hi, to create a Nyquist plot from the measured voltage and current data obtained in the time domain, you need to perform a Fourier Transform to convert the data into the frequency domain. However, simply taking the FFT of the voltage and current signals might not provide accurate impedance values for a fuel cell.
You may consider the following approaches to calculate the Nyquist plot from your measured data:
- Preprocess the data:
- Ensure that the voltage and current signals have the same length and are properly aligned.
- Apply any necessary filtering or preprocessing techniques to remove noise or artifacts from the signals.
2. Perform a Fourier Transform:
- Use a suitable Fourier Transform method, such as the Fast Fourier Transform (FFT), to convert the voltage and current signals from the time domain to the frequency domain.
- Apply a windowing function if needed to reduce spectral leakage.
3. Calculate impedance:
- Divide the voltage spectrum by the current spectrum to obtain the complex impedance at each frequency bin.
- Note that impedance can be calculated as impedance = voltage_fft ./ current_fft, assuming the signals are properly scaled and aligned.
4. Plot the Nyquist plot:
- Create a scatter plot using the real and imaginary parts of the impedance values.
- Use the plot function to plot real(impedance) on the x-axis and imag(impedance) on the y-axis.
Following is an example code snippet illustrating the steps mentioned above:
% Assuming you have voltage and current signals in the time domain: voltage and current
% Perform Fourier Transform
voltage_fft = fft(voltage);
current_fft = fft(current);
% Calculate impedance
impedance = voltage_fft ./ current_fft;
% Plot Nyquist plot
figure;
plot(real(impedance), imag(impedance), 'o');
xlabel('Real Part');
ylabel('Imaginary Part');
title('Nyquist Plot');
6 Comments
More Answers (0)
See Also
Categories
Find more on Spectral Measurements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!