We introduce flat systems, which are equivalent to linear ones via a special type of feedback called endogenous. Their physical properties are subsumed by a linearizing output and they might be regarded as providing another nonlinear extension of Kalman's controllability. The distance to flatness is measured by a non-negative integer, the defect. We utilize differential algebra which suits well to the fact that, in accordance with Willems' standpoint, flatness and defect are best defined without distinguishing between input, state, output and other variables. Many realistic classes of examples are flat. We treat two popular ones: the crane and the car with n trailers, the motion planning of which is obtained via elementary properties of planar curves. The three non-flat examples, the simple, double and variable length pendulums, are borrowed from nonlinear physics. A high frequency control strategy is proposed such that the averaged systems become flat.