Computing the gains of a piecewise affine system I have a piecewise affine (and memoryless) system, e.g., a response like the following one.



I could manually find the gain in each region by applying a ramp signal. However, the system's input must be a sine wave. 

Is there any technique that could be used to find the individual gain and slopes in each region?
Add a DC signal to your sinusoidal input, so that the input falls in the middle of each line segment of the input-output curve. Then choose the amplitude of the input sinusoid in order to avoid "spilling over" into the other segments. Measure the amplitude of the output sinusoid (neglecting its DC component, of course). Lastly, compute the gain.