SignalProcessing Improvements in Maple 2024
The SignalProcessing package has been expanded with new and updated commands.

> with( SignalProcessing ):ResponseSpectrum• The new SignalProcessing:-ResponseSpectrum command is used to plot the response ofa structure or system to varying frequencies of ground motion or input excitation. A
response spectrum is commonly used in structural and earthquake engineering toassess 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' = " " );data d12

10.

0.00630000000000000

20.0200000000000000

0.00364000000000000

30.0400000000000000

0.000990000000000000

40.0600000000000000

0.00428000000000000

50.0800000000000000

0.00758000000000000

60.100000000000000

0.0108700000000000

70.120000000000000

0.00682000000000000

80.140000000000000

0.00277000000000000

90.160000000000000«L0.00128000000000000«101560 # 2 Matrix> dataplot( data[..,1], data[..,2], 'style' = 'line', 'color' ='burgundy', 'title' = "El Centro Earthquake Vibration Data", 'size'= [800,400] );

0.2

0.1

1020

El Centro Earthquake Vibration Data

0.2

0.1

01020

L0.1

L0.2

L0.3
• For appropriate choices of parameters, we can obtain a collection of charts and datacontainers:> 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'];
Absolute Acceleration Response Spectrum
12Absolute Acceleration

108642123
PeriodIntegrateData 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:4

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

10.

10.

20.0202020202020202

20.00253172077517917

30.0404040404040404

30.00994445238601361

40.0606060606060606

40.0218526600137242

50.0808080808080808

50.0377328474375233

60.101010101010101

60.0569400702908049

70.121212121212121

70.0787270525835511

80.141414141414141

80.102265426482862

90.161616161616162«90.126668579468995
«

,

10

10
100 element Vector[column]

100 element Vector[column]> x0 := 1.0:
> X := IntegrateData( V, 'step' = dt, 'initial' = x0, 'method' ='trapezoid', 'output' = 'running' );

Xd

1

1.

2

1.00002557293712

31.00015159488825

41.00047277784178

51.00107465165442

61.00203094375268

71.00340131873121

81.00522952559047

91.00754199029705«10100 element Vector[column]

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

10.8
0.6
0.4
0.2
00.5

11.5timeL0.2
L0.4
L0.6
velocityposition• 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');
1. s
Td

2. s
3. s

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

Vd

1.

ms

4.

ms

9.

ms

> IntegrateData( V, 'step' = 1.0 * Unit('s') );9. m

> IntegrateData( T, V );9. m
> X := IntegrateData( T, V, 'output' = 'running' );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.59MiB, alloc change=23.43MiB, cpu time=44.70ms, real time=37.80ms, gc time=10.84ms• 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 thecommand:> 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'] );T, X d10.

10.500000000000000

20.0634665182543393

20.554388268287918

30.126933036508679

30.590776420081786

40.190399554763018

40.609878010776001

50.253866073017357

50.613015006233614

60.317332591271696

60.602061900484086

70.380799109526036

70.579369962161271

80.444265627780375

80.547674379843885

90.507732146034714«

90.509987694012340
«

,

1010
100 element Vector[column]

100 element Vector[column]> E := FindPeakPoints( T, X, 'output ' = 'extremes' );Ed0.

0.500000000000000

0.253866073017357

0.613015006233614

0.888531255560750

0.331728739964295

2.03092858413886

1.38695812292269

3.36372546747998

L0.613337080157934

4.06185716827771

L0.331577874022796

5.14078797860148«

L1.38937848216177«> 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] );

10.5

0
1

2

3

4

L0.5

L1Signal

Extremes5