Signal Generation Simulator
Working & Mathematical Model
Simulator Workflow
- User selects waveform type (Sine, Cosine, Rectangular, Triangular)
- Adjusts parameters:
- Amplitude (A)
- Frequency (f)
- Duty Cycle (for rectangular)
- Time axis is generated (t values)
- Signal equation is applied for each time point
- Graph is plotted using Chart.js
- Power and Period are calculated and displayed
Mathematical Representation
1. Sine Wave:
y(t) = A · sin(2Ï€ f t)
2. Cosine Wave:
y(t) = A · cos(2Ï€ f t)
3. Rectangular (Pulse) Wave:
The rectangular waveform is a periodic non-sinusoidal signal defined over one period T = 1/f. It alternates between two levels (typically 0 and A) based on the duty cycle D.
Duty Cycle (D): Fraction of one period for which the signal is HIGH
D = Pulse Width / T
Pulse Width (Ï„): Ï„ = D · T
Mathematical Representation:
y(t) =
{ A, 0 ≤ (t mod T) < Ï„
0, Ï„ ≤ (t mod T) < T }
This waveform is widely used in digital systems, switching circuits, and pulse modulation techniques.
4. Triangular Wave:
The triangular waveform is a continuous, piecewise linear periodic signal characterized by linear rise and fall segments.
Standard Mathematical Form:
y(t) = (2A/Ï€) · sin-1(sin(2Ï€ f t))
Alternatively, it can be expressed as a Fourier series containing only odd harmonics with amplitudes decreasing as 1/n², which makes it smoother compared to a rectangular waveform.
The triangular wave is commonly used in signal processing, modulation schemes, and waveform synthesis due to its linearity.
Power Calculation
- Sine / Cosine: P = A² / 2
- Rectangular: P = A² × (Duty Cycle / 100)
- Triangular: P = A² / 3
Summary
- Amplitude (A): Controls height of the wave
- Frequency (f): Controls how fast wave repeats
- Period (T): Time for one cycle → T = 1/f
- Duty Cycle: Percentage of ON time (rectangular only)