Cos Block
Trigonometric cosine function: y = cos(u)
Open Cos in BlockWerk →# Cos Block Documentation
Overview
The Cos block computes the cosine trigonometric function of the input signal.
Inputs
- Input (rad): A numeric signal in radians
Outputs
- cos(x): The cosine of the input, ranging from -1 to 1
Parameters
None
Mathematical Definition
y(t) = cos(u(t))
Behavior
- Input range: Any real number (in radians)
- Output range: [-1, 1]
- The function is continuous and periodic with period 2π
Examples
Example 1: Phase-Shifted Sine
Cosine is sine shifted by π/2:
- Input: 0 → Output: 1
- Input: π/2 → Output: 0
- Input: π → Output: -1
- Input: 3π/2 → Output: 0
- Input: 2π → Output: 1
Example 2: Create Orthogonal Signals
Ramp → Gain(2π) → {Sin, Cos} → Combine
Creates 90° phase-shifted pair for quadrature encoding
Common Use Cases
1. Quadrature signals: Create 90° phase-shifted pairs 2. Frequency conversion: Complex exponential (e^jθ = cos(θ) + j·sin(θ)) 3. Coordinate transforms: Rotation matrices, Clarke/Park transforms 4. Phase detection: Phase-locked loops
See Also
Sin- Sine functionTan- Tangent functionArcCos- Inverse cosine