EIS impedance calculation from measured data

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 comentario

Florian Bittner
Florian Bittner el 21 de Sept. de 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.

Iniciar sesión para comentar.

 Respuesta aceptada

Ruchika
Ruchika el 16 de Ag. de 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:
  1. 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 comentarios

Ruben Messner
Ruben Messner el 16 de Ag. de 2023
Thx for your quick response!
I already did pretty much what you're recommending. Except preprocessing the data. Maybe that's my problem...
Following is my data including the FFT of it:
My nyquist plot looks currently like this:
I'll try to filter my signals first. Any filter recommendations? I exported the data from an oscilloscope (voltage and current arrays have same length and are alligned).
Ruben
Ruchika
Ruchika el 16 de Ag. de 2023
Editada: Ruchika el 16 de Ag. de 2023
Hi, if you want to filter your voltage and current signals before performing the Fourier Transform, you have several options depending on the characteristics of your signals and the specific requirements of your application. Here are a few common filter recommendations:
  1. Low-pass filter:
  • If you are interested in analyzing the low-frequency components of your signals, you can apply a low-pass filter to remove higher-frequency noise or unwanted components.
  • MATLAB provides various low-pass filter design functions, such as designfilt or fir1, which allow you to design and apply filters with specific cutoff frequencies and filter orders.
2. Band-pass filter:
  • If you are interested in analyzing a specific frequency range, you can use a band-pass filter to isolate the desired frequency band while attenuating frequencies outside that range.
  • MATLAB provides functions like designfilt or fir1 to design and apply band-pass filters with specific cutoff frequencies and filter orders.
3. Notch filter:
  • If you have specific noise or interference frequencies that you want to remove, you can use a notch filter to attenuate those frequencies while preserving the rest of the spectrum.
  • MATLAB provides functions like designfilt or fir1 to design and apply notch filters with specific notch frequencies and filter orders.
The choice of filter type, cutoff frequencies, and filter order depends on your specific requirements and the characteristics of your signals. You may need to experiment with different filter configurations to achieve the desired filtering performance.
Ruben Messner
Ruben Messner el 16 de Ag. de 2023
Thx! The filtered time domain signals look good now. Can't see a difference in the frequency domain, probably because I'm only interested in low frequencies (0.1Hz to 1kHz)
Can I adjust the nyquist plot so it only shows data for a certain frequency span?
Ruchika
Ruchika el 16 de Ag. de 2023
Yes, you can adjust the Nyquist plot to display data within a specific frequency span of interest. By limiting the frequency range, you can focus on the desired low-frequency components and exclude higher frequencies that are not of interest.
To modify the Nyquist plot to show data within a certain frequency span, you can apply a frequency mask to filter out the unwanted frequency components.
Ruben Messner
Ruben Messner el 16 de Ag. de 2023
Thx, it seems like it worked :)
Ruben Messner
Ruben Messner el 18 de Ag. de 2023
Hi again,
do you also have an idea how it's done with this code? He used sth like tfestimate...

Iniciar sesión para comentar.

Más respuestas (0)

Productos

Versión

R2020b

Preguntada:

el 16 de Ag. de 2023

Comentada:

el 21 de Sept. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by