I've done a bunch of custom battle tests and have concluded that the best way to use spearwall polearm units like Voulgiers and Obudshaers against melee cavalry is offensively.
With or without guard mode on these guys can fall quite easily against a charge if they just stand there and take it. The reason is twofold. First, their weapons are far shorter than pikes, which means they can't really keep cavalry away at a safe distance, nor impale them very well. Secondly, they don't start seriously attacking until awhile after the charge is received. By then a sizable amount of their troops would have fallen to cavalry swords and maces.
So, taking a cue from this MTW unit guide, I decided to use these guys offensively.
After some initial 1 vs. 1 tests, I found that the best way to deploy them was in a two rank deep long line, guard mode off and spearwall on. They should attack from a at least a half arrow-shot away. After careful observation I noticed that the polearms were lowered at an angle whenever the enemy drew near. If the enemy cavalry charged them in this state, the polearm units would partially resist the charge and the cavalry would suffer significant losses. If the weapons were not lowered the cavalry would utterly crush them.
I did some more formal tests to flesh out this theory. On each side were multiple units such that the total florin cost (in-campaign) for both was about equal. The enemy cavalry in every test were Famiglia Ducale, because they do not suffer from the shield bug, provide a good challenge, and are widely available mid-game. Weaker units were given armor upgrades since they would very likely have them in-game. At the start of the battle every unit was properly deployed and ordered to attack the nearest enemy. They would re-attack if the enemy retreated. The conditions were Scottish Glen, summer, clear weather, medium difficulty.
Test 1
6 Obudshaers vs. 5 Famiglia Ducale
Approx. in-campaign cost: 4360 florins
Results:
OS: (138 men lost/361 men deployed)*720 florins*6 = 1651 florins lost
FD: (171 men lost/201 men deployed)*880 florins*5 = 3743 florins lost
Florin loss ratio: 2.267
Test 2
7 Voulgiers (upgraded to heavy mail) vs. 4 Famiglia Ducale
Approx. in-campaign cost: 3545 florins
Results:
VG: (124 men lost/421 men deployed)*510 florins*7 = 1051 florins lost
FD: (131 men lost/161 men deployed)*880 florins*4 = 2864 florins lost
Florin loss ratio: 2.725
Test 3
9 Halberd Militia (Hungarian, upgraded to heavy mail) vs. 3 Famiglia Ducale
Approx. in-campaign cost: 2670 florins
Results:
HM: (125 men lost/541 men deployed)*300 florins*9 = 624 florins lost
FD: (104 men lost/121 men deployed)*880 florins*3 = 2269 florins lost
Florin loss ratio: 3.636
Conclusion
It appears that cheap spearwall polearm units such as Eastern European Halberd Militia are well suited to offensively taking on heavy knights, even if the knights' charges will cause significant casualties. Better spearwall polearm units will also work, but the economic advantages will be lessened. Polearm units in general are also good against armored sword and spear infantry, making spearwall polearm units especially good with their dual roles.
Non-spearwall polearm units such as Janissary Heavy Inf and Billmen will still die quickly against cavalry charges, however, no matter what they do.
Bookmarks