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

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : MaplePortal/SignalProcessing

 

Signal Processing

Back to Portal

Maple's SignalProcessing package offers tools for FFTs, DFTs, wavelet analysis, IIR and FIR filters, signal generation, spectrograms and more.

 

Example - Identifying Signal Frequencies from a Spectrogram and Periodogram

 

withSignalProcessing:

 

Here, we will identify the frequencies of an artificially generated signal. The signal will be a sum of two sinusoids with frequencies of 12 Hz and 24 Hz.

N210:samplingRate100:signalVectorN,isin12.2πisamplingRate+1.5sin24.2πisamplingRate,datatype=float8:


Plot the spectrogram and periodogram

Spectrogramsignal,samplerate=samplingRate,size=1000,200

Periodogramsignal,samplerate=samplingRate,size=1000,200


The spectrogram and power spectrum correctly identifies the two frequencies used to generate the original data.

 

Example - Filtering Audio

 

First import the audio

filecatkerneloptsdatadir,//audio//MapleSimMono11025.wav

originalSpeechAudioTools:-Readfile

originalSpeech?

(1)

 

samplingRateattributesoriginalSpeech1

samplingRate11025

(2)

SpectrogramoriginalSpeech,size=1000,200,reduceplot=1

PeriodogramoriginalSpeech,size=1000,200,reduceplot=4

 

Now let's apply a Butterworth filter to the audio. Define the critical frequency, generate the filter taps, and apply the filter.

fc800

tapsGenerateButterworthTaps9,fcsamplingRate,filtertype=lowpass;filteredSpeechInfiniteImpulseResponseFilteroriginalSpeech,taps

Then generate the spectrogram and periodogram

SpectrogramfilteredSpeech,samplerate=samplingRate,size=1000,200,reduceplot=1

PeriodogramfilteredSpeech,samplerate=samplingRate,size=1000,200

 

You can also export the filtered audio

#A≔AudioTools:-CreatefilteredSpeech,rate=11025;#AudioTools:-WriteIIRtest.wav,A

 

 

 

Applications

Identifying Periodicity of Sunspots

Signal Denoising

FIR and IIR Filters

Apply Filters to Audio

Spectrogram Examples