Signal Processing - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


SignalProcessing Improvements in Maple 2024

The SignalProcessing package has been expanded with new and updated commands.

with( SignalProcessing ):

 

ResponseSpectrum

IntegrateData and IntegrateData2D

FindPeakPoints

ResponseSpectrum

• 

The new SignalProcessing:-ResponseSpectrum command is used to plot the response of a structure or system to varying frequencies of ground motion or input excitation. A response spectrum is commonly used in structural and earthquake engineering to assess the potential response of a structure to seismic events.

• 

Consider the following vibration data from the El Centro earthquake of 1940:

file := FileTools:-JoinPath( [ kernelopts( 'datadir' ), "datasets", "el-centro_NS.txt" ] ):

data := ImportMatrix( file, 'delimiter' = " " );

(1)

dataplot( data[..,1], data[..,2], 'style' = 'line', 'color' = 'burgundy', 'title' = "El Centro Earthquake Vibration Data", 'size' = [800,400] );

• 

For appropriate choices of parameters, we can obtain a collection of charts and data containers:

R := ResponseSpectrum( data, 0.02, 0.01, 5, 'zeta' = 0.02, 'beta' = 0.25, 'gamma' = 0.5, 'output' = 'record' ):

• 

For example, we can view the plot of acceleration:

R['absoluteaccelerationplot'];

IntegrateData and IntegrateData2D

• 

The SignalProcessing:-IntegrateData command has been updated to include an option initial to specify the initial area and output option running to return running totals. For example, suppose we want to determine position from velocity:

t1 := 0.0:

t2 := 2.0:

n := 100:

( dt, T, V ) := GenerateSignal( t * exp(-t/2) * sin(2*t*Pi), t = t1 .. t2, n, 'output' = ['timestep','times','signal'] );

(2)

x0 := 1.0:

X := IntegrateData( V, 'step' = dt, 'initial' = x0, 'method' = 'trapezoid', 'output' = 'running' );

(3)

dataplot( T, [ V, X ], 'color' = ['darkgreen','blue'], 'labels' = ["time",""], 'legend' = ['velocity','position'], 'style' = 'line', 'size' = [800,400] );

• 

The SignalProcessing:-IntegrateData and SignalProcessing:-IntegrateData2D commands have also been updated to be units aware. For example:

T := Vector( [1,2,3], 'datatype' = 'float[8]' ) * Unit('s');

T1.s2.s3.s

(4)

V := Vector( [1,4,9], 'datatype' = 'float[8]' ) * Unit('m/s');

V1.ms4.ms9.ms

(5)

IntegrateData( V, 'step' = 1.0 * Unit('s') );

9.m

(6)

IntegrateData( T, V );

9.m

(7)

X := IntegrateData( T, V, 'output' = 'running' );

X0.2.50000000000000m9.m

(8)

FindPeakPoints

• 

The heavy computations involved in the SignalProcessing:-FindPeakPoints command have been moved to external code, resulting in a substantial increase in speed. For example:

n := 25000:

A := Vector( n, i -> 1 - i * (-1)^(i+1), 'datatype' = 'float[8]' ):

R := CodeTools:-Usage( FindPeakPoints( A, 'output' = 'record' ), 'iterations' = 10 ):

memory used=5.60MiB, alloc change=87.32MiB, cpu time=35.10ms, real time=30.60ms, gc time=9.24ms

• 

The CPU time required in Maple 2024 is about 100 times smaller than in Maple 2023.

• 

Two new output options, extremes and extremeindices, have also been added to the command:

f := sin(t) + 1/2 * cos(3*t):

a := 0:

b := 2 * Pi:

n := 100:

( T, X ) := GenerateSignal( f, t = a .. b, n, 'output' = ['times','signal'] );

(9)

E := FindPeakPoints( T, X, 'output ' = 'extremes' );

E0.0.5000000000000000.2538660730173570.6130150062336140.8885312555607500.3317287399642952.030928584138861.386958122922693.36372546747998−0.6133370801579344.06185716827771−0.3315778740227965.14078797860148−1.389378482161776.283185307179590.500000000000000

(10)

p := dataplot( T, X, 'style' = 'line', 'legend' = "Signal", 'color' = 'firebrick' ):

q := dataplot( E[..,1], E[..,2], 'style' = 'line', 'legend' = "Extremes", 'color' = 'blue' ):

plots:-display( p, q, 'size' = [800,400] );