.Wavelet.Examples.fileDataDenoising

Information

This function carries out denoising operation to the one-dimensional data read from a specified *.MAT file, which is a simulation database generated by Dymola. The original data, the decomposed data in different levels, the denoised data in all levels and the denoised data are displayed with diagrams. In addition, the noise that is removed from the signal is displayed in a diagram, too.

The default input values provide an example to show the functionality of this function.

Refer to the description of Families for detailed information about the available wavelets.

Interface

function fileDataDenoising
  import Modelica_LinearSystems2.Utilities.Plot.Records.Diagram;
  import Modelica_LinearSystems2.Utilities.Plot.Records.Curve;
  input String fileName = "testSignal2.mat" "The MAT file containing the signal to be analyzed" annotation(
    Dialog(group = "Input data"));
  input String signalName = "y" "The signal name to be analyzed" annotation(
    Dialog(group = "Input data"));
  input Real t0 = 0.0 "Start time of the signal to be analyzed" annotation(
    Dialog(group = "Input data"));
  input Real t1 = 1.0 "End time of the signal to be analyzed" annotation(
    Dialog(group = "Input data"));
  input Real fs = 200.0 "Sampling frequency of the signal for analysis. 
      This is used to generate an equidistant time grid with the expected time step. 
      If fs == 0, the simulation time grid will be used, even if it is none-equidistant.
      Since wavelet analysis has to be done in equidistant time grid, non-equidistant time grids
      usually cause incorrect results." annotation(
    Dialog(group = "Input data"));
  input Records.wavletDefinition wd "Wavelet definition. Note: Only (bi)orthogonal wavelets can be used for MRA. Valid parameters are wavID (<=7), Nd, Nr and range (dMeyer)" annotation(
    Dialog(group = "Input data"));
  input Records.denoisParameters dp "Data and parameters for wavelet denoising" annotation(
    Dialog(group = "Input data"));
  output Real y[:] "Denoised signal" annotation(
    Dialog(enable = false));
  output Real noise[:] "Noise removed from signal" annotation(
    Dialog(enable = false));
  output Real c[:] "Original wavelet coefficients of all levels, details see wavDec()" annotation(
    Dialog(enable = false));
  output Real cth[:] "Wavelet coefficients of all levels after applying thresholds" annotation(
    Dialog(enable = false));
  output Integer len[:] "Lengths of coefficients for each levels, details see wavDec()" annotation(
    Dialog(enable = false));
end fileDataDenoising;

Generated at 2024-11-22T19:25:38Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos