PartialPeriodicWaveform

PartialPeriodicWaveform#

class PartialPeriodicWaveform#

Bases: Waveform

PartialPeriodicWaveform abstract base class for partial periodic waveforms.

Provides common functionality for waveforms that have periodic behavior only during a portion of their duration, with rise and fall transitions. Useful for pulse-like signals with smooth transitions. Inherits from Waveform.

Example1:

% Create a pulse with rise and fall times
pulse = TrapezoidalPulse(amplitude = 2.0, ...
                         riseTime = 0.001, fallTime = 0.001);
pulse.plot();

Example2:

% Check periodic properties
disp(['Periodic duration: ', num2str(pulse.PeriodicDuration), ' s']);
disp(['Number of periods: ', num2str(pulse.NPeriod)]);
Constructor Summary
PartialPeriodicWaveform()#

Construct a PartialPeriodicWaveform object.

Abstract base class constructor. Subclasses should implement their own constructors with appropriate parameters.

Property Summary
Amplitude double = 0#

Peak-to-peak amplitude, usually in Volts.

DurationOneCycle#

Duration of one complete cycle segment.

EndTimeAllCycle#

End time of all complete cycles.

FallTime double {mustBeNonnegative} = 0#

In s - Fall transition time.

Frequency double {mustBePositive} = 100#

In Hz

NPeriod#

Number of complete periods in the periodic duration.

NRepeat#

Number of times the cycle segment repeats.

Offset double = 0#

Offset, usually in Volts.

Period#

In s - Time period of one complete cycle.

PeriodicDuration#

Duration of the periodic portion.

PeriodicEndTime#

End time of the periodic portion.

PeriodicStartTime#

Start time of the periodic portion.

Phase double = 0#

In radians

RiseTime double {mustBeNonnegative} = 0#

In s - Rise transition time.

SampleAfter#

Samples after the periodic portion.

SampleBefore#

Samples before the periodic portion.

SampleExtra#

Extra samples beyond complete cycles.

SampleOneCycle#

Sample values for one complete cycle.

Method Summary
plotExtra()#

Plot extra samples beyond complete cycles.

Example:

pulse = TrapezoidalPulse(amplitude = 2.0, frequency = 1000, duration = 0.015);
pulse.plotExtra();
plotOneCycle()#

Plot one complete cycle of the periodic portion.

Example:

pulse = TrapezoidalPulse(amplitude = 2.0, frequency = 1000);
pulse.plotOneCycle();