Final answer:
The filter equation for the weighted average is y(k) = (x(k) + x(k-1) + y(k-1) + y(k-2)) / 4, where y and x represent the filtered output and raw measurement at time step k, respectively.
Step-by-step explanation:
The student is looking for an equation to filter data by computing a weighted average of the current and previous raw measurements with the past 2 filtered measurements, with equal weights. The equation to compute the current output y(k) can be represented as:
y(k) = (x(k) + x(k-1) + y(k-1) + y(k-2)) / 4
Here, x(k) is the current raw measurement,
- x(k-1) is the previous raw measurement,
- y(k-1) is the previous filtered output, and
- y(k-2) is the filtered output from two time steps prior.
This equation ensures that each measurement (both raw and filtered) contributes equally to the new filtered value.