Here are the 9 steps:
Step 1: Mastering the Figure. In this step you get familiar with the figure upon which your prelude will be build. The figure is a melodic or rhythmic formula. Usually in a prelude there are only very few figures. In order to fully understand the structure of the figure, you need to memorize it and transpose it to as many keys as you can.
Step 2: Opening Cadence. This is the opening formula of the prelude. It establishes the main key and has a tonic pedal point. Usually it also has some excursions to the key of Subdominant. Memorize and transpose it for best results.
Step 3: Cadence. Contrary to the opening cadence which introduces the main key for the first time, the cadence brings a musical idea to a close. Cadences can be found at least several times during the course of the prelude. Again, memorize and play it in various keys.
Step 4: Descending Sequence. Such sequence is a common device to connect two different keys. In other words, it is used as a way to modulate.
Step 5: Ascending Sequence. It is perhaps somewhat less common than the descending version but nevertheless very useful. It creates a rising tension because it ascends upwards.
By the way, sequences can also stay in the same key as it started. As with previous step, you need to memorize it and transpose to various keys.
Step 6: Closing Cadence. You need some kind of harmonic idea which would suit well for the ending of your prelude. Some closing cadences also have pedal points (both Dominant and Tonic).
By the way, if you use Dominant pedal point the listeners will feel a tension rising because there is a constant emphasis on the Dominant note (5th scale degree) without proper resolution.
Tonic pedal point, on the other hand, emphasizes the Tonic note (1st scale degree) in the bass and has a feeling of completeness and tranquility.
Step 7: Application of the Figure. After mastering Step 6, you are now equipped for every kind of compositional device to improvise the prelude. However, it is very useful first to apply the figure to different harmonic structures.
For example, we can take chords from some other existing compositions and play them by using our figure.
Step 8: Improvisation of the Chordal Outlines. Contrary to the previous step, where the chords where given, you will now improvise chords for your own prelude. If you mastered all the steps so far, Step 8 is not that difficult at all.
Step 9: Putting It All Together: Improvisation of the Prelude. This is the culmination of the entire learning process.
You take figure, sequences, and cadences and create (improvise) a prelude based on the previous step. As always, transposing everything to various keys will give you much freedom.
If you internalize many different figures, cadences, and sequences, they will become truly your own. This way you will become a master at improvising any prelude you want. I bet this would be a skill you could be really proud of.
By the way, do you want to learn to improvise in the style of Bach? If so, I suggest you check out my free 9 day mini course in Keyboard Prelude Improvisation.
Or if you want to learn my special powerful techniques which help me to master any piece of organ music up to 10 times faster? If so, download my free Organ Practice Guide.